i think they called weed dope first back in the 60s and 70s and then heroin came around in the 80s and 90s and since heroin could kinda make u look like you're high on weed w the low eyes, croaky voice, nodding out, goofy smile, it just sort of became a norm to refer to them both as dope.
dope is essentially any drug affecting dopamine in some way or more as an umbrella term for all recreational drugs but weed and heroin have the most association with it.
heroin users likely wanted a euphemism anyway because talking about it casually, heroin has a very dark undertone whereas dope seems more casual and cool.
just my 2cents.
i'm not entirely sure when heroin itself blew up as a recreational drug but i somehow feel weed was definitely more mainstream before heroin took off.. and i know for a fact it was referred to as dope by the people from the hippie era..
i could be wrong however, this is all speculation from my end.
i really wouldn't be bothered with slang. it's regional.. everyone has their own thing
where i'm from we call weed:-
high-grade, medi, kushkush, collie, kush, peng, gas, flower, hydro.
we also have slang specific with where the weed is from as we mainly get imported weed
foreign - imported dro
jam - weed imported from jamaica
colo or creepy - weed imported from columbia.
local - weed locally grown (usually outdoor)
i personally like to call it dro, peng or erb