Extremely relatable post. I worked someplace that had a policy of absolutely never changing your Active Directory username because it was the primary key in like a dozen internal systems. Someone finally made a massive stink about it to HR when their name had legally changed but IT was forcing them to use their old name (and they were absolutely right to complain. It was a ridiculous policy only in place due to terrible architecture). They still defaulted to telling people no but they did at least document all the highly tedious manual steps necessary to change the name in all affected systems if (when) another employee refused to take no for an answer.
Was certainly a great lesson in schema design, among other things.
Windows actually uses SIDs to map internal users to windows settings such as profile locations and group policies. Open regedit and under HKEY_USERS there will be the SID for your user account which maps to HKEY_CURRENT_USER.
Linux has UIDs that map to the username.
Both methods allow for changing the user name without having to change permissions on files. Both need manual manipulation to transition the user's folder name to the new username. Both also allow for creating a user folder that does not match the username. Example HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList on Windows.
Best practice and reality are two different things. Even Microsoft often will use the fully qualified user profile path in their coding instead of %USERPROFILE%, example would be OneDrive. Just look at the Environment key in regedit for the current user.
> Like usernames. You don’t use usernames as primary keys for anything, do you? What happens when people marry?
well it's extremly painful to rename the primary mail address or the UPN when it comes to microsoft 365 and active directory, especially in a hybrid environment. of course you can change upn's but it's definitly some kind of "primary key" for a user. in fact most systems at least use a UPN
It's just a restriction imposed on SharePoint folder names bubbling up. Nothing fancy.