Interestingly, the original client for Bitcoin had a Pay to IP feature — the client would connect to an IP and ask for a pubkey to send funds to.
This feature was removed quite early as Satoshi did not want to implement network protocol encryption to protect against mitm at the time. It also went against the “not online to receive” pattern of PayToPubkey(hash). The feature wasn’t missed.
This is similar to IPIP transfers done internally by banks. I suspect this is where the idea came from.
Keysends in LN behave similarly to Pay to IP. Instead they contact the node directly and exchanges material to facilitate the payment. As LN is always online, this pattern suits spontaneous payments where the peer is alive and can negotiate cryptographic material.