If it hadn’t been for the rock, the ship wouldn’t have gone aground.
What does this idiom mean, exactly?
From The Economist.
It's a sarcastic way of describing the unjustified shifting of blame. It basically suggests that it's not the captain's fault that the ship went aground, it's the rock's fault for being there.
“if it hadn’t been for the rock, the ship wouldn’t have gone aground”
Blames the inanimate stationary rock for a ship running aground. The implication is that the ship was poorly navigated, thus crashing into said rock however those in charge of the ship are placing the blame on the rock.
While the rock sunk the ship, avoiding this rock would only have bought a temporary reprieve as the disastrous management would almost certainly have found another rock to crash into.
There was a foreseeable obstacle. But people without foresight are saying things would have been fine if there were no obstacle.
In the literal case, the foreseeable obstacle is the rock, and the people without foresight are the helmsman/captain/owner/etc.
In the figurative case, the Economist's MP source is arguing that the foreseeable obstacle is the economic crash (all booms end) and the people without foresight are certain members of Labour.