What underlies the Hanafi ruling permitting obligatory prayer inside?

Prayer in, Around, and on the Roof of the Kaaba