Federally, in places of public accommodation, discrimination based on race, color, religion, or national origin is prohibited by the Civil Rights Act of 1964.
This was upheld in Heart of Atlanta Motel, Inc. v. United States 379 U.S. 241. As summarized in that case, "Public Accommodations" cover:
any inn, hotel, motel, or other establishment which provides lodging to transient guests, other than an establishment located within a building which contains not more than five rooms for rent or hire and which is actually occupied by the proprietor of such establishment as his residence
any restaurant, cafeteria . . .
any motion picture house . . .
any establishment . . . which is physically located within the premises of any establishment otherwise covered by this subsection, or . . . within the premises of which is physically located any such covered establishment . . .
In Oregon, there are additional restrictions imposed by the Equality Act of 2007:
Except as provided in subsection (2) of this section, all persons within the jurisdiction of this state are entitled to the full and equal accommodations, advantages, facilities and privileges of any place of public accommodation, without any distinction, discrimination or restriction on account of race, color, religion, sex, sexual orientation, national origin, marital status or age if the individual is 18 years of age or older.
In Oregon, a "place of public accommodation" includes:
Any place or service offering to the public accommodations, advantages, facilities or privileges whether in the nature of goods, services, lodgings, amusements, transportation or otherwise.
Other states may not have these extra prohibitions or different prohibitions. They may also have statutory exceptions for peoples' sincerely held religious beliefs.
Why the legislature chose to specifically protect these classes is a policy question better asked on Politics.SE.