Food handling in Thailand is at a primitive level, and those involved need better education and regulation. Many do not adhere to basic hygiene rules of hand-washing before and after handling food. Many do not even have running water and a bar of soap.
No wonder dysentery is rife. Tourists and Thais suffer upset stomachs and other illness that are certainly attributable to poor hygiene. It is not a good advertisement for the tourist industry.
Food vendors need to be regularly inspected by public health officials and closed down if found to be violating standards, with staff made to attend education classes before they are allowed to reopen.