This will usually also happen after around 2 weeks, when a transaction was not included into a block because of low fee rate
This 14 day window is unrelated to the space in the mempool. By default, unconfirmed transactions transactions are dropped from the memory pool of nodes, it could be earlier or later for different nodes depending on their configuration. But when majority of nodes no longer have it on their mempool, it is best to rebroadcast it.
This is different from what bitmover is talking about. If a node exceeds their memory space (300mb by default) they can drop low fee transactions to free up space and include higher priority transactions (based on weight), even though those low fee transactions have not lasted close to 14 days unconfirmed.
- Jay -