Why the room cannot be cooled by opening the doors of refregerator?

Because of the second law of thermodynamics.

A fridge is essentially moving hot air from the inside of the fridge to the outside environment. By opening the door you are connecting the hot and cold reservoir.