Yes. That’s what the expression:“The road to hell is paved with the best of intentions:” means,
“The road to heaven (for some) has been built by the worst of intentions (of others.)
The opposite is also true. Some bad things have produced unexpected longrange good results. This is the pronciple of malbonis, has also occurred in history.
The overall living standards, scientific awakening, and positive political transformations in many countries came about as a result of oppressive and exploitative European colonialism that lasted for centuries.
Read: The West on Trial