People are normally just curious about what happens when things are combined, and don’t necessarily do it because they’re harmful.
Take cocaine for example. This drug is very addictive, and very harmful to you if you take it in high doses. But originally, cocaine was just found in small amounts in a plant that the indigenous people of South America used to chew, as it gave them “strength and energy”.
It wasn’t particularly harmful, or addictive, so scientists isolated cocaine, and started to make pure amounts of it. They then started selling it. Unfortunately, it turns out that pure cocaine has a lot of harmful effects on humans, and so it was banned.
It’s the same story for most other drugs – scientists just trying things out, and it turns out to be bad. That’s why ethics is really important in science – you always have to ask the question “Just because I can do it, should I do it?”.
This same thing applies to all areas of science. Another good example is the nuclear bomb. Initially, people just started wondering “what happens if I put a lot of radioactive material in one place?”. The end result was the worst and most powerful weapon humans have ever built. So the question must be asked – just because we can build nuclear bombs, should we? I don’t think there’s a clear answer here.