hostvars[some_ip] does not contain `ansible_hostname`

Why would this be? It has lots and lots of ansible_* variables, but some others like ansible_hostname or ansible_mounts.

This is not the case for hosts though, just some.

In order to access some ansible_* variables you need to gather facts on the host before.

See e.g. https://stackoverflow.com/questions/45908067/whats-the-difference-between-inventory-hostname-and-ansible-hostname