In the Civil Rights cases (1883) the Supreme Court ruled that Congress could not prohibit discrimination in public accommodations because Congress did not have the power to regulate private affairs.
The Supreme Court ruled in these five different cases that the 14th amendment (which contains the Equal Protection clause) does not protect African-American citizens from segregation in private affairs. In this case, the Supreme Court ruled that private affairs included businesses, such as hotels and trains.