SHIII is only a simulation, not reality. Mods help a lot, but can't get around hard-coding.
It was written by programmers who either didn't do in-depth research or were not able/allowed to do everything accurately.
Historically, boats ran on the surface as much as possible. They needed to keep their batteries charged, breathable air in the boat, and they needed to be able to search visually for targets. They were also far slower under water; convoys could out-run them over distance.
As ASW efforts became more effective, they spent less and less time surfaced during the day, preferring the cloak of darkness for safety.