My point was more along the lines of it is wasting time. If you do something bad for the right reason and then later find out it is bad then at least you know that solution was the issue and you can try a different solution next time.
If you do something right for the wrong reason then you have absolutely nothing to learn from and have made no progress at all at finding the correct solution for the problem at hand.
But you could well have done a huge amount of damage before you realise it's the wrong solution. History is full of examples of identifying a problem and putting an entirely inappropriate, and damaging, "solutions"
- the Russian monarchy is bad, let's put a "Communist" dictatorship in place
- 1930's German farms can't support its people, let's invade Eastern Europe
- modern Britain can't afford to pay for all of the hospitals/schools it needs right now, let's pay the private sector to build them for us, keep paying for them for the next 20 years and then find out that we own none of it
- terrorists sometimes communicate on the internet, let's bug everyone's conversations
If you do something right for the wrong reason then you have absolutely nothing to learn from and have made no progress at all at finding the correct solution for the problem at hand.