In the past, businesses could refuse service to anyone they wanted, for any reason. It was like a members-only club, where the owner got to decide who was in and who was out. But as time went on, people started to realize that this wasn't exactly fair or equal, and laws were put in place to protect certain groups from being discriminated against.
Nowadays, businesses can still refuse service, but only in certain situations. For example, if someone is being disruptive or violent, a business can ask them to leave. Or, if a customer is trying to fraudulently return an item, the store can refuse to help them. It's all about finding a balance between business rights and customer rights.