This is because of you transfer funds from overseas legitimate sources under your own name and you spend the money for own use such as hotel booking, fine dining and so on in Thailand.
Thai government wants foreign exchange/ earning in Thailand and spend the money in Thai businesses.
If Thai banks close your account, it is like they skilling by themselves.