Do you have some countries in mind where that's illegal?
That would most likely be illegal in Finland. You're not allowed predatory pricing. And the same is true for the EU as a whole, although you may have to be operating in an international market, not just a local one. See Abuse of dominance in: https://en.wikipedia.org/wiki/Article_102_of_the_Treaty_on_t...
The US, the Sherman Antitrust Act prohibits predatory pricing.
In Germany, selling goods for less then the one bought them for can be illegal if its used to push competition out on a large scale.