"VAT" (the idea) is certainly not a mistake, it's one of the best way to do taxes, because it's, if not painless, at least almost invisible to the taxpayer (but it's considered by many to be unjust, because the poor spend a much larger part of their income in taxable goods than the rich, and so pay a bigger share of VAT).
The complexity of VAT in Europe is recent.
(I think) it used to be the case that if you sold something from one European country to another, then you weren't subject to VAT because it was considered an "export". Foreign companies (esp. US-based ones like Amazon) exploited this loophole so much, it became a problem. All they had to do was set up shop in a small, low-tax country [1] (Luxembourg / Ireland) and sell in every other country tax-free.
So the EU created this rule that the VAT that should be paid, is the VAT of the country where the customer resides -- it had to be, because if it was the VAT of the seller's country then companies would have again clustered in the country with the lowest VAT in order to evade the new rule.
It's not a bad rule; if you're a huge corporation, well, maybe you don't like it but you can hire the necessary lawyers and accountants to implement it.
If you're an SMB that sells across Europe, it's absolutely horrible. I guess the bureaucrats who wrote the rule didn't care much about SMBs or thought there were few who sold internationally.
It would be simple to exonerate SMBs based on their revenue (and I think it's the case, but the triggers are very low and different in every country); it would be even simpler to have just one tax rate but that's politically impossible.
In practice it doesn't seem to be very much enforced for small companies.
- - -
[1] Low corporate tax, to optimize taxes even further; no need to be based in a low-tax country to free oneself from VAT; the smaller the country the better, because you want to have as few of your customers in the same country as you, as possible.