I was trying to change ports on some IIS sites and was facing this issue:
I tried to select different certificates and found that only certificates starting with "*" would allow me to change the host name. Instead of changing the required certificates I simply used this command:
Basically: If you are not using a wildcard certificate, f.ex. you are using a SAN cert, than IIS will not allow to change any values, especially not the host name. In SharePoint you might stumble upon host names, f.ex. MySite tend to use those, and might run into this issue.