The gun armaments on the British and American carriers reflected their configuration in 1960/61 (someone really needs to do some detailed updated orbats

).
The last 5" guns on Midway were removed in
1977 in OTL, although many of the original 18 had been whittled down before then.
For the British ships, the Midway equivalent Maltas did have some of their 3.75" mounts removed in various 1960s refits, to be replaced by more modern missile systems, Legion Close-in Weapons Systems and other new lighter autocannnon. The same has happened to the Audacious class and the Ark Royals, but none of them have been completely shorn of their guns yet
(Incidentally, the historical Ark Royal similarly lost her guns in stages:
https://www.seaforces.org/marint/Royal- ... -Royal.htm )
Why haven't they been completely removed yet? Three things - political interference, countering threats other than aircraft and missiles and numbers:
- The RN has been subject to some interesting degrees of political interference by Prime Minister Stanley Barton on some very particular aspects of design and operations - some admirals have whispered that it is their misfortune to cop two Churchills in one lifetime - and one of these is to do with gun armament. It turns out that he was talking to President Kennedy during one of his trips to the White House, and they fell into considerable agreement that it was worth retaining them, if but to reserve space for the type of future rapid fire guns or combined gun-missile mounts that were then being developed.
- As well as aircraft, missiles and politicians, there are other dangers in this world for ships of all sizes, ranging from extremely large ones that swim around in the Pacific and have attacked Tokyo and Shanghai and sunk an Imperial Chinese battleship, to others which might not be quite so large or formidable, but which nevertheless can cause significant damage. Having the ability to engage and drive off nasties like these at distances of 25,000 to 35,000 yards cheaply and without cracking open/taking away from their wartime armament is not seen as altogether a bad thing
- Numbers: The following explanation is provided by Kevin Malone from
The Office
"Big ship change take time. Ship take time in yard = Ship not able to go out and play, or cover other ship which come back home from play. Not long ago, many ship go out and play far away in place called Viet Nam. Big play. Long time. Many ship only get short time in port. Now, that play time over, but ship still need go all over. Navy plan big ship change party. Call it SLEP. It let them make big changes, plus make old ship seem like not so old any more. First
Langley, then
United States class ships and other
Enterprises. Navy want long term have 24 carriers able go out and play; for now, put up with 20. Just now, not have 20 yet - have 19, and some them be old
Midways which can't play so good."
Hopefully that makes sense, but the gist of it is that serious yard times where *some* gun mounts get taken off and replaced with extended decks or new weapons is a can that has been kicked down the road throughout the 1960s with Vietnam, and now is finally starting to get moving. The idea of trying to get (the DE version of, which would be a tad larger) some sort of CVV, or conventionally powered 'medium' carrier is at the least being looked at, as one of several proposals.
(Simon waits for someone to notice that the USN has an Asiatic Fleet and a Mediterranean Fleet in addition to the Atlantic and Pacific Fleets, or to notice the other hidden Easter eggs

)