The 40hp is clearly a 60hp EFI power head. the specs all match exactly. The 25hp, however, is the same power head as both the 25hp and 30hp EFI. The Mercury Marine Product Manager states that it does make 25hp at the pump and that it is based on the 30hp powerhead. I can only assume that the reason that it is not based off of the 40hp EFI is weight. The 40 EFI motor is listed at 216 dry weight, significantly heavier than the 25hp 157#, the 30hp 172# and jet at 186#.
It is easy to remap an EFI motor for more horsepower, my buddies and I do it all the time to automobile motors, I am sure that it is possible to do in marine applications as well. Additionally, there are intake, exhaust and injectors, as well as other ways to squeeze more hp out of a motor, so it is possible to use the smaller displacement powerhead to active the same hp rating.
All that being said, I sure would like to see documented proof or a statement as to how they got to that hp number of a clear listing on their site like every other outboard manufacturer.