"The four teenage lead characters of Scooby-Doo were inspired by four of the main characters from the 1959-63 American television sitcom The Many Loves of Dobie Gillis, with Shaggy having been derived from the character Maynard G. Krebs, as played by Bob Denver. Maynard's beatnik-style goatee, general appearance, and use of the word "like" as a form of punctuation all found their way into the character of Shaggy, with the base personality of the character updated to make him a hippie rather than a beatnik" -Shaggy Rogers Wikipedia excerpt.
Here's the gist... Cartoon aired from '69- '76 and cannabis was rapidly growing during this era much like Rock-N-Roll. Hanna-Barbera had the insight to branch off on one of their projects and make a toon for the hipsters. Who knew it would catch on like wildfire among the masses!? With spooky plots and clever underlying themes masked from minors while adults still caught the irony it was an instant success.
They couldn't show them actually smoking but was allowed to show the after effects.... munchies. Hence the reason they were always hungry and downing enormous amounts of food and Scooby-snacks. Google or Wikipedia the history and you will be amazed at what you find out! Disney and Pixar are still utilizing this strategy to the day. Though not with cannabis but relative other adult themed topics. What better way to get parents and kids involved in an animation all at once?