Why is Thailand the allies of myanmar?

They are not really at all. There are often border schirmishes (firing of grenades etc over the border) - and border crossings being closed. This has not happened for a couple of years now, but they are far from allies. They are both part of Asean.