AKA cross-chain atomic swaps. An atomic swap is a digital asset transfer that makes both sides of a transaction dependent upon an agreed upon procedure to settle the transaction without an intermediary.
Examples: If Alice and Bob wanted to trade large amounts of one alt-coin for another, on-chain swapping would make sense since there is no third party intermediary (i.e. an exchange).
Other possible uses are within “trust-less” exchanges and in smart contract transactions allowing two parties to exchange different currencies (or tokens) without the risk of one party defaulting on the trade.
Some on-chain limitations:
Both currencies should support time lock contracts.
Some programming skills required to use it (2018).
Reduces privacy as payments on two chains can be linked.
Both currencies that are being exchanged must have the same hash algorithm.