Read about old-timey publishers and businessmen leaves the impression people used to drink very heavily, even at work. Books on management in the 1950s say every bank had executives who one did not visit on Friday afternoons as society turned a blind eye to the problems caused by alcohol, a great pleasure for many.
Was driving home listening to the radio when WC Fields was followed by a routine making fun of Dean Martin being so drunk he “picked up a snake and was trying to club a stick”. Made me think you don’t really see drunks treated as lovable misfits in the media these days. Who were the last ones?
Barney Gumble on The Simpsons might be sort of a (deliberate?) example of this stereotype, though you could argue he’s neither high-functioning nor lovable enough.
Maybe not as a “lovable drunk” schtick, but lots of shows feature drinking/drunkenness as a more or less endearing thing- look at “How I Met Your Mother” for example. Or “Big Bang Theory”, albeit less so.