Because
He first examined all of the doors. He was able to see damage to two of them from bullets and acid respectively, so those two were trap rooms
When he touched the door handle of one of the remaining two doors, it was still hot from the furnace test, so it was a trap room
He slowly removed his hand before triggering the trap
He went to the nextlast door (now a 1 in 3 chance),and opened it, did not smell acid or see bullets on the floor, so and he went in. Had he smelled acid or seen bullets, he would not have gone in (and not have gotten the treasure).