I find it odd that the Queen Elizabeth has only a 40 aircraft compliment.
The difference is hangar space, with in either case 20 aircraft are parked on the deck and the remainder (50 vs 20) in the hangar.
The USN plans 138 m² per aircraft at full complement (which is pretty much achieved with "triangular" parking of the aircraft as tightly as possible and if you want some room hoisting aircraft up to the hangar roof).
The RN plans 260 m² per aircraft, which allows a maintenance crew to actually walk around the aircraft and set up shop in one corner. The hangar in itself is slightly smaller (5200 vs 6900 m²).
Well, and cost-saving of course. Not only do those F-35 cost a ton of money, the Queen Elizabeth will also only have one-third the crew of Gerald Ford.