The original reason for white clothes was not to look good and never get them dirty, but to get them dirty and be able to clean them completely. Because only white clothes can be cleaned completely.
If the garment was white originally then you can clearly see when it's dirty and where it is dirty.