Swapping, as @Cerberos calls it, is not a lgnuitsic process, at least not a "simply" one. Metathesis involves many steps, as does reconstruction, incidently, that shouldn't be brushed under the rug and will be explained elsewhere.
Since square and quarry are suppised to be derived from the same paradigm, it should be prudent to point out that *kʷer- is reconstructed Proto-Indo-European–implying that the questionable change had already happened and is not exclusively Latin. Germanic "four" stands to reason. There is however no strong reason to associate *kʷer- "to make, do" with quadro other than a square slab from the quarry being a piece of work.
German Würfel "die" also stands to reason. Though derived from werfen, its etymology is toobweak and too close to werben "seek employment, offer services", and by extension Arbeit (a < o regularly, oo < uo as in Norse, cp. Ođin, Wodan).
In Sanskrit is usually assumed to be the base of the word for "smith". Not only has PIE no unique word for smith, there is also no unique word for "one", or "I". Anatolian, Tocharian and Celtic disagree on those. Anatolian also has no *kʷetwóres, at least no proof of it because IIII is almost never spelled out, but there is evidence of a different word quite similar May. However, there is a chance that *kʷetu had already existed, on account of octo.
All this is to imply that "4" was an innovation.
Ergo, the metathesis explanation is an appeal to ignorance. It could be that -trt- was simplified but the more usual result would be a syllabified sonorant, similar to *(d)Kmt- "centum".
Of course, as long as I have no better explanation I can only disagree and call it uncertain. Phonotactic barriers explain at best why analogy didn't work out.