In every recipe I see for fries, popcorn, churros, and other foods where I normally want to add the salt/sugar/seasoning at the end, everybody says to make sure to do it while the food is still hot so the seasoning sticks. Why is this? Is this just something people say, or does it really matter a lot?
It's really not about temperature at all.
"While it's still hot" is a great description of when to do it, but it's not why.
You want to salt fried food when it's straight from the oil, because the surface is still wet with oil. This ensures that the salt sticks to the surface of the food. As the food sits, the surface will dry (it cools off at the same time-- which is where the "while it's hot" advice comes from).
Even with non-fried foods, heat often comes with surface moisture, either from the cooking process or from the steam being released by the hot food.
Salt sticks to "wet" surfaces. Freshly cooked, still-hot food usually has a "wet" surface (either from water, steam, or oil).