Holodecks run on an "independent" power source from the rest of the ship. They were more important than the shields or weapons or life support which ran on the same power as the rest of the ship. Kind of silly but the plot often required that the holodecks stay working when everything else was failing. Like in Night when the aliens dampened the entire ships power. Except for Captain Proton which stayed active but dimmed the lights slightly.