Today, a transaction in Bitcoin requires payment of fees in order to be entered into a block, confirmed and recorded on the blockchain.
This was not always the case. Fees, i.e. the commission costs to be paid to miners, are in theory not strictly necessary.
Transaction fees on Bitcoin and LN
First of all, it is not necessary to always have to register a BTC transaction on the Bitcoin blockchain. Initially it was, but since the release of Lightning Network off-chain transactions can also be made that do not require registration on the blockchain.
It is still necessary to pay a fee, but this fee does not go to the miners, who only record transactions on the blockchain, but to the LN node you are using. For example, if you use your own node, you can pay no fees or you can pay fees to yourself.
The fees for LN transactions are also negligible and therefore not problematic.
It is actually more interesting to focus on on-chain transactions.
The Bitcoin protocol does not necessarily charge fees for transactions to be recorded on the blockchain.
So-called “coinbase” transactions, i.e. those with which miners are entitled to create a certain number of new bitcoin if they succeed in mining a block, have no fees, because if there were any they would be fees that the miners would pay to themselves, therefore totally useless.
But this is only of interest to miners, not ordinary users.
The first transaction ever recorded on the Bitcoin blockchain with BTC sent from one user to another, included in block 170 on 12 January 2009, had no fee. That is, the miner who mined that block, presumably Satoshi Nakamoto or Hal Finney, agreed to put that transaction on the block he was mining, partly because it entitled him to self-assign 50 BTC anyway.
The fact that the miner can self-allocate a certain number of bitcoin created out of thin air for each block he mines, until this reward is halved (perhaps around 2140), is enough of an incentive to consume electricity to mine, so that he does not need any further incentive to place transactions to be confirmed within the blocks.
However, this dynamic has long been outdated.
Each block has a limited size, and can only include a certain number of transactions, hardly more than 3,000. When there are more than 3,000 transactions waiting to be recorded on the blockchain, miners choose the ones with the highest fees to include in the block they are trying to mine.
This is why bitcoin transactions with zero fees have long been very unlikely to be included in a block by miners, who obviously prefer those with higher fees.
Even today, some are sometimes included in the blockchain, but only when the queue of pending transactions is very small indeed, i.e. when the marginal cost of including a zero-fee transaction in a block is zero.
Bitcoin’s network in a state of congestion
At the most congested times in the Bitcoin network, zero-fee transactions have virtually no chance of being confirmed, and after a while are simply discarded and effectively cancelled before they even go through. In quieter times, however, a few are confirmed after a bit of a wait, although that wait can be days, weeks or months.
It is worth remembering that with some non-custodial wallets, it is possible either to change the fees of a transaction that has yet to be recorded on the blockchain, or to cancel it before it is finally entered into a block.
When the reward for who mines a block is reset to zero, the only revenue for miners will be the fees, so it is plausible that they will only have an incentive to confirm them if the sender has set substantial fees for them. It is possible, however, that long before this happens, the block size may have increased, or that the use of LNs becomes so widespread that the problem becomes unimportant.