ISO 3166-2:HK is the entry for Hong Kong in ISO 3166-2, which was published in 1998 by the International Organization for Standardization (ISO) to define codes for the names of the principal administrative subdivisions of all countries coded in ISO 3166-1 (first published by the ISO in 1974).
Hong Kong itself is peculiar in that it both has its own ISO 3166-1 "top-level" code, HK (which itself has no ISO 3166-2 subdivisions listed) and that it also has a code as a subdivision of China, as CN-HK.
Hong Kong is a special administrative region (SAR) of China, hence warranting its own "top-level" code HK/HKG and also existing under the entry for China. This is a situation it shares with the other SAR, Macau, as well as similar territories such as Puerto Rico US-PR / PR, and Aruba NL-AR / AR.
A full list of such cases can be found at: ISO 3166-2#Subdivisions included in ISO 3166-1.
The existence of the Hong Kong Flag emoji, 🇭🇰, is possible because of Hong-Kong's inclusion in the ISO 3166-1 top-level codes (see: Emoji flag sequence).