As Hinkley says, it's a task switch cost. Tickets may also involve a whole load more circus. They get seen by managers with metrics. The advantage of an in-place TODO is precisely that it doesn't get seen by people to whom it is not relevant, and that it can be left indefinitely.
Notably, if that TODO is turned into a ticket, there's a good chance it'll get triaged and eventually marked as cancelled/wontfix. Which is a perfectly reasonable thing to do when part of backlog management is saying no to things that'll never get prioritised. But, that work is still sitting there not done, and capturing that _somewhere_ has value, and alongside the code is about as context-rich as you can hope for.