How many minutes are you okay with your medical record being open for inspection by anyone that walks by? Other medical staff, admin staff, janitorial staff, other patients getting steps in, other patient's families?
It's one of many instances where there's a valid reason for the technology to be implemented as such but since doctors usually aren't thinking about the technology or security aspects they just perceive it as annoying.
No, there is never a good reason to prevent a professional from doing his job. If the user finds it annoying, it is annoying: that's it!
Learn to work for the user rather than against the user, and you'll become a better developer.
edit: in any case this is very likely a security configuration by the hospital infosec team, not the developer of the EMR.
(Work for a PACS vendor, subject to the same stuff).