You need to forget everything that you have learned and been taught about driving. The "law" means nothing, might is right, and do what you please. Thailand has very good driving laws, but like all other laws the problem is zero enforcement.
It cuts both ways and although the local drivers are cretins, you can ride as you damm well please - for example passing a cop truck, double line, 2X the speed limit, on the rear wheel. The cops are so lazy and corrupt it is too much bother to chase you, and far easier pickings to set up no helmet ambushes