"Why is buying residential flats in Hong Kong a form of investment?"
When we calculate total spending in the economy in order to measure GDP, it is divided into consumption (all spending by households EXCEPT residential investment), investment (spending on capital goods, INCLUDING household purchases of new homes, plus inventories), Government spending on final goods and services, and net exports (see http://www.censtatd.gov.hk/hong_kong_statistics/statistics_by_subject/concept/national_income/index.jsp for a discussion of the components of GDP in the Hong Kong context). Residential investment receives different treatment from all other household spending. Why?
Residential investment shares some characteristics with durables (furniture, cars, electical appliances, etc), which are included in consumption: both are purchased to be used over time rather than consumed at a given point in time. However, in other respects residential investment is much more like a capital good that a firm purchases. First, it is purchased to provide a stream of services (a place to live) in future periods. Second it does not get used up in providing those services. And third it is a very large investment that is often financed with borrowing.
So the view from the statistical office is that households invest in housing in order to enjoy a stream of future services. They then consume the services from the house, rather than the house itself.
For flats that are purchased in order to rent out as a source of income, this is clearly the appropriate treatment: the landlord uses the flat as a capital good in order to earn future revenue. In the case of owner-occupied housing, we treat the owner as both the landlord and the tenant! The owner buys the flat (an investment good) and receives rent from the tenant (himself) in return for owning it.
This treatment of housing is applied to other statistics as well. For example, when the Consumer Price Index is computed (see http://www.censtatd.gov.hk/statistical_literacy/educational_materials/introduction_to_the_consumer_price_index/index.jsp), the price of new houses is excluded. Instead the Census and Statistics department imputes a rent to home owners, and it is the value of this rent that enters the CPI.
This may seem like a strange way to treat housing, but as long as it is applied consistently, the data are not misleading. There are many different "correct" ways that statistics can be computed.