Re: "Alf said what most people were thinking"
"Speight's intention was for people to laugh AT Alf Garnett, not with him."
Humour is often the nervous reaction to taboo subjects. Much of the comedy in films, and even earlier in theatre, was derived from parodying certain types of people. If some had not held those views then the humour would not have been there.
English humour is often based on a double-edged sword where those being mocked do not recognise they are the butt of the joke at which they are laughing.
"Rising Damp" also held up a mirror to society - particularly in the character of the landlord Rigsby. The "Carry On" films were similarly a humorous treatment of the prejudices and conventions of their times. The list is endless.