As German U-Boats are based in the Baltic Sea, and one of the requirements was close costal operations, one design specification is that they can operate there.
The same is true for countries that operate in the northern Mediterranean and Persian Gulf. The US east coast is also pretty shallow near enough to shore for a lot of signals intelligence.
Cold war era sub operations were mostly cat & mouse games over very deep water, except for some intelligence gathering work. There is a lot more demand now for operating in littoral zones. The USN's Virginia-class submarine being the prime example.