It is quite obvious that the miners, creating bitcoin mining farms, were aware that the time would come when the last bitcoin would be mined. But by that time their equipment should not only pay off, but also make a profit. In the future, most likely the income will be received from the transactions with the coin.