標準ライブラリが main()を呼ぶ前に stdin, stdout, stderrを開いている
(内部的にfopenを同等の動作)

で、通常はstdin, stdout, stderrはわざわざ閉じる必要はない。

とりあえずそういうもんだと思え。