Psychoactives (meaning just about all common recreational drugs, weed, grass, pot, dope, speed, heroin, E etc. etc. etc.) act by the same basic mechanisms: they increase stimulation of particular regions, essentially causing an overload.
This means that it can work well for excelling at a certain task- as Crunk88 points out, but at the cost of cortical plasticity: essentially the ability to change, adapt and learn new tasks. This kind of mental rigidity gets to be a real pain in the *** later on in life.
Not to mention some (not all) people are susceptible to addiction, and the reason many start taking more and more is because your brain responds less to the same dose due to a combination of nerve damage and desensitisation.
In the end this is associated with behavioral problems and loss of function- and seeing as for the most part the ability to live with other people is important, taking these kinds of drugs recreationally is a risk and often a burden.
Fun fact: caffeine does the same thing as the drugs listed above.