Things don't always come down to that. Look at the Cod Wars between Iceland and the UK. Three times Iceland pushed the UK - a nuclear power with hundreds of times its population - back further and further out its shores. The UK had the military ability to crush Iceland like an ant. But Iceland succeeded by combination of making it economically unfeasible for the British to fish Icelandic waters (net cutters, for example) and well-played international geopolitical maneuvering (for example, threatening to give the NATO base at Keflavík to the Soviets if the US didn't exert pressure on the UK, while also successfully positioning itself as a small weak state being bullied by a large powerful one)
Anyway, the Outer Space Treaty was well meaning. Think of the context of the Cold War and how that was all playing out. It seemed logical to think that both nations would begin laying claim to various bodies (or parts thereof), say by landing as many landers as they could to them... which would inherently lead to disputes, just like happens with worthless pieces of land on Earth - with the each side supporting their claim by military means, just like happens on Earth. It was seen as a ripe grounds for an unchecked military escalation, and while it would start out on other celestial bodies, it would progress to LEO and GEO, and then to Earth.
They were probably way overly optimistic about the space of advancement in space technology (remember, this was 1967) and overly pessimistic about everything else. They certainly weren't trying to "block commercial mining"; the goal was simply to prevent a space arms race between rival powers. Quite to the contrary, the treaty talks frequently about encouraging the peaceful use of space for the benefit of humanity. There's just one detail missing, which is to make explicit that corporations or individuals own what they mine. Without that, there won't be much of any "use of space" beyond exploration.