yes, in both cases I bought them on the phone while at the check in counter. One was bus ticket the other a plane. I think air Asia was the plane ticket. Can’t remember the bus ticket site.
Many times it is the airline checking you in that demands it. I’ve had it several times and no amount of explaining to them will work. They won’t let you board without it. Had it in both Barcelona and Doha. Just bought a cancellable ticket and showed them.
As far as Thai immigration, I’ve never been asked and that wouldn’t make sense