The purpose of diversifying a portfolio is to create a mix of high-risk and low-risk real estate investments to reduce the impact of losses in the long run and increase long-term returns on investment.