But what will happen if all bitcoins have been mined? Wouldn't that be very unprofitable for most of the miners out there?
If all bitcoins have been mined probably, miners will make some fees in the transaction for them to earn bitcoins. I think it will become unprofitable from the miners and the user will pay a large amount for their transaction to be processed.