This is a test NASA performed before any Apollo launch. This was to make sure the spacecraft could run on internal power and all its systems operated without the umbilical connection to the launch tower. It was a vital test that had be performed to insure a successful mission.
The CSM subsystems are operated together through a complete simulated mission. In addition, a manned suit loop test is performed with the flight crews to check the environmental control subsystem and all other crew equipment are completely functional.
In 1967 during a Plugs-Out test on Apollo 1, a fire started in the Command Module that killed the 3 Astronauts. Many procedures changed after the fire, but the Plugs-Out test still must be carried out on all spacecraft.