Basketball and baseball does the opposite: home team wears their whites, visiting team wears their normal home colors or greys/blacks. I think it's from an old timey rule where teams would wear bright or non-white colored uniforms while on multi-leg road trips to hide dirt, scuffing, blood, etc. if they didn't have the time or facilities to wash their gear while traveling. It's also more exciting for home fans because they get to see different uniform colors and whatnot instead of the same home colors every time.