Locked doors in healthcare settings are primarily used for patient safety and security. They help prevent patients, especially those with cognitive impairments or psychiatric conditions, from wandering into unsafe areas. Additionally, locked doors ensure the security of sensitive areas such as medication rooms, supply closets, and administrative offices.