There is quite a bit that happens between when the kitchen produces your food and it is wrapped and ready for you to pick up.
Add to that (for better or worse) that the government makes certain assumptions about tip amounts based on sales amounts, so the mere act of service staff ringing something up makes certain assumptions about tip amounts.
And also, servers do a bunch of prep work - rolling silverware (or plastic ware), folding pizza boxes, prepping condiments (filling ramekins with salsa, for example) etc etc. If they are handing that stuff for takeout, they should be tipped for that also.
So there are things. I'm not arguing right or wrong or what it's worth, but there are a lot of things that go into preparing food for takeout that you would miss if they didn't happen.