I've only had a tiny amount of exposure to the problem in Australia, but use of really dodgy construction materials was the issue here in Adelaide.
(Importing cheap panels, and flooring material made of asbestos).
I did watch an electrical inspection video of a Sydney (IIRC) high rise, that was built by a Chinese firm.
The conclusion was that every piece of equipment (switches, fuses, plugs, sockets, junction boxes, cables, etc.) had to be removed and replaced.
The head of the inspection teams said something like:
It's not just that they didn't follow regulations and standards, it looks like no one in the supply chain, or the installation crew, has ever heard of any standard, for any thing.
So I'm guessing, cheapest possible everything, from cheapest possible source, and in the Thailand case, bribing of inspectors (if any exist).