Why is Thailand in TNO a republic?

Why did Thailand abolish the monarchy in TNO? Since Phibun wasn’t a republican in real life, is there a specific reason for this?