That is not the point, the banks are allowing local currency to be taken from a foreign account, they are providing a service.
The fact that Thai banks charge more for that service than banks in other countries is irrelevant. You either want the service at that price or you don't. You should not forget that the Thai baht is still a controlled currency.
In Cambodia they have separate ATM's, you can only get USD from a foreign account, not the local currency.