Yes they can do this because their store is private property even though it is open to the public. While a government may not be able to prosecute you for having a "cuss word" on your shirt without abridging your right to free speech, a private store cannot abridge your right because it is not a government or a government official. The First Amendment is directed to government action: "Congress shall make no law . . . abridging the freedom of speech . . ."
WTF don't you get about the following:
1. It's their store, their private property, not yours.
2. They make the rules, not you, just like you get to make the rules at your house.
3. You have no right to remain on their private property if you are told to leave, just like the store manager has no right to enter and remain in your house if you won't let him in.
4. You don't allege any discrimination, except as to obscene shirts and people wearing them.
5. People with obscene shirts are not a protected class under the equal protection clause.
I am not your lawyer and you are not my client. Free advice here is without recourse and any reliance thereupon is at your sole risk. This is done without compensation as a free public service. I am licensed in IL, MO, TX and I am a Reg. Pat. Atty. so advice in any other jurisdiction is strictly general advice and should be confirmed with an attorney licensed in that jurisdiction.