For all the detail we see in the game, it is massive set of abstractions. The more things that are done and built in, the more effort to do it and get it right. Plus to make sure it still can run on machines that are far from the newest.
So what about transferring planes to other bases when a carrier is in a TF that is docked, or disbanded in port? It is true that IRL you could not do that. If that were not allowed in the game, you would have to simply un-dock the TF, or create a one-ship TF with just the carrier, make the transfer, then re-dock the TF or disband the one-ship TF you just created. The game engine allows you to make the transfer to avoid totally unnecessary player work. Those extra steps do not add to the game at all, so why force players to go through them?
OK, but then why make a player dock a carrier to get off planes when the carrier is too damaged to fly them off? Because the act of docking has checks in it: 1) make sure the ship(s) in the TF can fit at the dock, 2) make sure the total tonnage of the TF can fit at the dock, and 3) make sure no ship in the TF has fires burning.
Remember that every bit of smarts built into the software adds to the time, effort, complexity, chance of failure, etc. We make plenty of requests that get fulfilled. Would stopping players from transferring planes to other bases while a carrier's TF is docked or a carrier is disbanded really add anything to the game?