Catalyzes a rate-limiting step in cholesterol catabolism and bile acid biosynthesis by introducing a hydrophilic moiety at position 7 of cholesterol. Important for cholesterol homeostasis. cholesterol + O2 + reduced [NADPH--hemoprotein reductase] = 7alpha-hydroxycholesterol + H(+) + H2O + oxidized [NADPH--hemoprotein reductase] Lipid metabolism; bile acid biosynthesis. Belongs to the cytochrome P450 family.