But that isn't actually true. You didn't understand what you have been reading. Performance, especially climb, fell off starting at 12,000 ' and climb rate was no doubt very bad by 20,000', but that was not the ceiling. They routinely intercepted enemy bombers flying much higher than that.
You should read this article which I posted previously, about the use of P-40s in the defense of Darwin. From March to September 1942, Japanese records confirm that novice P-40E pilots from the 49th FG were able to shoot down 12 "Betty" bombers flying at 27,000' in spite of a heavy escort of A6M2s so not only were they able to fly that high, they were fairly effective in combat (albeit with heavy losses of their own) .
There is the "book" ceiling (service ceiling) at which a plane can still climb at 100ft per minute ( or a metric equivalent). rarely quoted is an operational ceiling, figured by the British for example as 500fpm of climb which allows a
formation of aircraft to maneuver and maintain formation (assume worst plane in the squadron is on the outside of a turn) and there is the COMBAT ceiling, generally around 1000fpm of climb which allows the plane to perform combat maneuvers without excessive loss of altitude. Obviously the last is the most subjective and nobodies aircraft could perform hard turns or part loops or other high energy consuming maneuvers in succession without losing altitude.
Given
enough time/warning a formation of P-40s could climb to intercept height and execute an attack run (or more than one) on a formation of bombers. Dog fighting the escorting Zeros was pretty much out of the question. Shoot at them if they were in front of you but otherwise, get in/get out turn around at a safe distance and repeat. trying to do much more than roll the P-40 form one side to the other and gentile snake turns was going to result in a large loss of altitude that would take minutes to recover from. A P-40 might take 6 minutes or more to climb from 24,000ft to 28,000ft depending on weight or air temp/pressure and that is at best climb speed, once at desired altitude it still has to accelerate to combat speed.
Depending on such a fighter to intercept attacking bombers is not a good choice if other fighters are available.
The Darwin campaign was an early experiment, efficiency got much better. AVG and later 23rd FG etc. were routinely shooting down high flying Japanese bombers all through the war with P-40E, K and later N with minimal and diminishing losses.
The P-40N had the later engine and all ceilings are raised by 3-4000 ft.
Stripping weight (pretty much guns, ammo and fuel) could also improve the performance of fighters in the field.
The P-40E was overweight, there is no" if, and or but" about it. The six .50 cal weapons installation was simply too heavy for the engine available. about 900lbs of guns and ammo which is several hundreds more than guns/ammo in a Spitfire V/IX or most of the the 1941-42 single engine fighters. It may be more than the FW 190. it may be triple what some of the Italian and Japanese fighters were carrying for armament.
Unfortunately once you design the plane around such a weapons load you can't go back to "zero" by simply taking out a pair of guns in the field and not filling up the ammo bins.
The P-40 gained around 300lbs of weight in the wing structure from the initial P-36 wing to the late model P-40 wings. If you want to keep the 8 "G" service rating (12 "G" ultimate load) you have to beef up the structure as the gross weight increases. Likewise weight of the landing gear/tires and even the fuselage may have to increase slightly to handle the higher weights. You are stuck with those wight increases in the field no matter what you do with the guns/ammo/armor.
Lets also remember that the P40D/E was
ordered in the spring-summer of 1940,
before the Battle of Britain.
Design and performance estimates have to looked at in that light and not as much what it was faced with in combat in late 1941 (British and Soviet ? use) and 1942 against the Japanese. Please note the P-40F prototype flew in the summer of 1941 around 6 months before Pearl Harbor so the US was not ignoring the lack of altitude capability of the P-40.
I would also note that the P-40D/E was initially rated with a combat load of 120 US gallons of gas. You could put an additional 28 US gallons in the rear fuselage tank but you basically had a 8100lb airplane with just that 120 US gallons of fuel and 1150hp engine (the WEP ratings are totally irrelevant at this point as at the time of the order/s and finish design work the older Hawk 81s {tomahawks and P-40B/C} had not entered active service let alone combat so there was NO unofficial combat boosting going on of the older engine let alone anything base overboosting of the new -39 engine on.)
It shouldn't have taken a degree in astrophysics to figure out the power to weight ratio wasn't going to be good to good. In defence in the summer of 1940 nobody else (except the the British ) had supercharger much better than the one on the Allison
in service.
Back to the weight thing. As a very rough estimate you can figure that the payload of plane (for a fighter guns/ammo/fuel/pilot etc) as 30% (or somewhere between 25-35% ) of the gross weight of plane in the initial design stage. You want to add 20-30% to the payload you need a plane that grosses 20-30% more to keep everything else (field length, stalling speed/turn etc) the same. But once you make the wings/fuselage/landing gear bigger and heavier to handle the higher payload you don't get all the performance back by not putting the full the payload into the larger aircraft.