-
I think context is important here. Fawlty towers revolves around poking fun at a horrible, small minded bigot who is constantly out of his depth.
For a slightly less offensive example of this look at Basil's insistence that he can speak Spanish but is incapable of communicating with Manuel because he is seemingly unaware that there is more than one Spanish dialect.
The scene with the major is (in my recollection anyway - it's been a while since I've seen it) actually quite funny because Basil is torn between recognising that the major is being highly offensive and calling him out on it or risking offending one of his most loyal customers. It wouldn't be made today and the language is to put it mildly highly offensive but it does effectively highlight and make fun of attitudes that were prevalent at the time and are still about today.
The bit in the hospital is also an attempt to poke fun at Basil's bigoted attitude.
TLDR John Cleese is the original hipster and was taking the piss out of brexiteers before brexit was even a thing. Ironically the man seems to have morphed into his own character.
-
The scene with the major is (in my recollection anyway - it's been a while since I've seen it) actually quite funny because Basil is torn between recognising that the major is being highly offensive and calling him out on it or risking offending one of his most loyal customers.
Doesn't the story revolve around the major taking a woman to a cricket match and her leaving with his wallet? The language is horrendous, but the story is quite clearly making fun of his attitude (and he's shown as hugely anachronistic and hidebound throughout the show). It would be quite strange to censor TV on the basis of offensive language being used, otherwise how would you show programmes and films that deal with those issues (e.g., Mississippi Burning)? The fact that something is a comedy doesn't prevent it from addressing serious issues. It might require a warning about language, but it's not exactly celebratory of discrimination.
It wasn't removed because of "The Germans".
https://www.theguardian.com/media/2020/jun/11/fawlty-towers-dont-mention-the-war-episode-removed-from-uktv