Some hotels keep their towels white using harsh bleaching agents that only the commercial world has access to. These chemicals shred the towel fibers, which is why they regularly swap their towels for new ones.
They also only wash their whites together. If you wash your whites with other colors, it can quickly discolor the whites.
Another hack is Borax. Borax can remove stains and freshen towels while keeping them super white.