That happens when you have several quests active at the same time. Every third quest you complete will give you a ticket. So if you completed two quests, the next one you’ll complete will give you a ticket. If you accept two quests, the one you complete first will give a ticket, but the second one will not.
If it worked differently, you’d get punished if you accepted a quest with a ticket but didn’t complete it.