Within EU, you have free movement of goods, and the VAT is generally paid in the country of sale, not in the country of of the consumer. There are a few exceptions to this, and other regions might have other trade agreements.
Within the EU definition, VAT taxes the company making the sale for the increase in value of a product through the processes the companies and distributors applied to it, and is not a taxation of the receipt of said value.
There is nothing illegitimate about then consuming the product in a different country. It just doesn't happen to send money to your own country's treasury.