According to numerous reports from the time, the Japanese were planning to execute nearly all the POWs if/when the invasion of Japan started. Dropping the bomb and the resultant sudden surrender stopped that.
Good article on one of the more notorious camps:
https://www.airspacemag.com/airspace...anx-180975333/