It's important to note that in the context of this question, transactions aren't "dropped from the blockchain". The blockchain represents transactions that were validated by nodes (locally) and registered as blocks in the blockchain (remotely). Each full node in the Ethereum network possesses its own copy of the blockchain in local memory, which means that when a transaction makes it to one of these nodes for validation, this process can be and is done offline. A transaction can remain pending in a node or never make it to the blockchain for a number of reasons, which can be grouped into four categories.
The first of which, maybe most obviously, is machine failure. While this is a constant in software engineering, it is still worth mentioning. The node simply could be corrupted by a software or hardware failure. There are enough nodes validating transactions that the failure of one is not enough to halt the creation of blocks, but widespread machine failure could prevent pending transactions from registering.
The second reason, also rather obvious, is that the transaction itself is invalid and cannot be validated, or cannot yet be validated. If a transaction is invalid because it's inherently invalid then it will never make it to the blockchain. But a transaction which "should" be valid may find itself in the mempool of a full node because of a nonce gap. Perhaps multiple transactions were made in rapid succession and the network didn't neatly serialize them or the client generating the transaction is poorly coded and assigned an invalid nonce, resulting in a transaction that made it to a node with a nonce that was higher (or even lower) than the node was expecting. In this case, this transaction will reside in the mempool until another transaction from the same address with the missing nonce makes it to the blockchain, and then the node will attempt to validate this "out-of-order" transaction. However, if the transaction with the missing nonce never makes it to the blockchain then this "out-of-order" transaction will reside in the mempool indefinitely until it's purged by the node for no other reason than lack of local memory (disk space). If the node had an infinite amount of memory then it would likely hang onto this transaction forever, but that is certainly not the case.
The third reason is competition. If the network is hot enough that there are more transactions willing to pay more gas than yours, enough to keep your transaction in a mempool long enough to get it purged (again, for no other reason than lack of disk space on the node itself), then your transaction may never become a block on the chain.
And the fourth reason is the exception to the rule. The credo of Ethereum is to break stuff and it's absolutely possible that future changes in the protocol could spell doom for pending transactions. Ethereum developers are warned at the door to be ready for anything and events in the past, namely the infamous hard fork, reinforce the wisdom of this advice.
But I suppose the bottom-line answer to the question of when transactions are purged from the mempool is whenever the node runs out of allocated disk space. The more important question to ask is why the transaction is lingering in the mempool.