I’ve had this happen only once in my flying history (at least that I remember). I am pretty sure it was a domestic US itinerary I had bought almost literally before leaving to the airport. I also think it happened not at check-in, but at the gate.
On the other hand, I have had a few instances, mostly with foreign carriers, where for me to buy a ticket for a different passenger, I needed to go through a whole process of sending them a scan of my card, a copy of my passport, a copy of the passenger’s passport, and an authorisation form. That was rather a pain to do when I was buying nearly last minute and the passenger and I were on different continents (I had to do it all at something like 3am where I was).
Finally, I have had at least two, maybe three instances where I discover on my credit card a plane ticket for a passenger I have never heard of in my life to somewhere I’ve never been, and in at least one case it was a purchase for a flight the same or the following day. I watch my cards pretty carefully, so I alerted my credit card issuer, they refunded the charge and made their own investigation. Both times it happened were about Christmas Day, when a lot of people are travelling and also a lot of people like myself are paying less attention to card transactions.
I hope they caught them, but of course I’ll never know. This last thing (which happened twice) is why the first two practices I list above exist, although it’s interesting that the first two were enforced fewer times than some people may have actually gotten away with using my card details fraudulently to do such a thing.
Be careful out there!