More accurately: combat is controlled chaos. Chaos, by it's very nature, tends to be chaotic (thus, "chaos"). And when you have enough people shooting enough sh-- in a confused situation, some of it's going to hit the wrong people, whether it's "collateral damage" or "friendly fire". As much as the Pentagon likes to pretend it can be eliminated completely...it can't. It can be mitigated by training, training, and more training, but it'll never go away. It's a natural part of battlefield friction.
In WWII, estimates of US friendly fire casualties were about 10% total casualties...in some theaters (Papua New Guinea, for example), as high as 30%.