One can presume that the phenomenon of creatures altering their state with drugs is primarily due to the way drugs capitilize on endogenous reward systems (like the opioid system) It is important also to note that the cange in state isn't all about feeling pleasure. Though certainly one's opioid system is manipulated when one takes heroin, there is also an equally important change in state and cognition. The feeling of being high, I'll argue, is equally as important as the change in cognition and perception.
Thinking creatures (of whatever degree) are fascinated with modifications in cognition and perception. Some times those changes in perception and cognition are beneficial, Such as the way someone can take shrooms as a way to look at a problem from another angle. Much like dreams, intoxicated experiences often re-imagine and re-frame current problems. When one is at a dead end sometimes dreams and high experiences will find a way out. The use of this is huge.
It is possible that creatures which sought "high" experiences survived more or were more productive sexually because of the removal of inhibitions and the a re-framing of a problem. If someone has an Idea while high about how to more efficiently hunt then his tribe will survive better and the next generation has more "High seekers".
This also leads to another interesting question. If High seeking behaviour is intellectually beneficial, do people with high IQs use drugs more? or use drugs for this purpose more. This could provide some support for the idea of whether high experiences do reframe problems, Though a supperior (and much harder to perform) experiment would be to give a representative sample a serious problem to solve which requires a reframing of the problem (there would have to be a way to still test people who had no difficulty with solving the problem.) and when they cannot solve the problem have them take some sort of drug (marijuana, shrooms) and instruct them to think about the problem, and talk about it while high, then see the percentage who find a solution to the problem.
(this clearly isn't a fully developed study, I have the idea now, I haven't really fleshed it out, I realise there are clear problems with it, but I feel like proposing the rough version of the study and seeing where people go with it.)
If this seems ridiculous then next time you're high (be it on drugs or alcohol, or nicotine) pay attention to how much of the enjoyment and importance of the experience was related to changing ones state of cognition, perception and therefore action
more simply put, Next time you're high ask yourself if you're doing this because it feels good, or because it gives you different ideas and solves problems, and makes you think in a way you normally wouldn't.