The company needs the invoice to make a payment. They typically don't care about the legal correctness. Particularly if the developer is in another country. Making the invoice look legal/official is more important than anything else.
Of course we could say that "this will never actually happen", but if the company had to pass a tax inspection, they would have to prove all their expenses by showing the corresponding invoices. And this would show that the developer has been generating irregular invoices.
I don't know for bigger companies, but as a (proper) autonomous worker in Spain, I had worked for just 1.5 years and already was asked once to prove some expenses with the corresponding invoices.
Not a single company could pay such an invoice.
(Germany, but pretty sure this applies in most of Europe)