Well, funny and offensive aren't necessarily mutually exclusive. Sometimes things can be funny because they are offensive. But things don't necessarily need to be offensive to be funny. And the Major saying the N-word would have been offensive even in the 1970s, just not as offensive as today.
But it was never the funniest part of the episode anyway. The funniest part is Basil offending the Germans and doing the Hitler impression. But we're not watching that going "Yes, you give it to them, Basil! The Germans have got it coming to them!" No, we're laughing at how ridiculous he is. We're laughing at him, not with him.
Some things cause great offense even at the time they are made. The pedophile episode of Brass Eye for example. It seemed that most people who were outraged by it hadn't actually seen it. It was actually very funny.