Buildings don’t just change hands. They change uses. Over time, a structure might start as a church, become a school, transition to a restaurant, and end up as a bed and breakfast.

This isn’t a bad thing. It’s a fact of life. It plays out everywhere and always has.

Right now, it is happening in the empty shells that once housed Rite Aid drugstores across the region.

These buildings — with their distinctive shape and coloring — will not stay vacant for long. The stores were in prominent locations on valuable real estate. They already are being flipped into new uses.

In Tarentum, a Rite Aid is now a church. In Monroeville, one is a Phantom Fireworks. But many are becoming dollar and discount stores.

Dollar Tree is moving in and taking over a number of locations, like those in Latrobe, Forest Hills and Scottdale. Dollar General is scuttling into other vacancies, including sites in Oakmont and Hazelwood.

These are good uses. In a down economy, these accessible, user-friendly shops are doing a service. It’s a growing sector of the retail market — even if dollar stores are now more like $2 or $3 or $5 stores. They provide convenient and affordable options.

But a dollar store isn’t a drug store, and that can leave communities at a loss. There is a difference between filling a space and filling a need.

An expensive leather dress shoe is an elegant way to cover a bare foot. But it is no help if you are playing hockey.

A shoe and a skate both have value, but they aren’t interchangeable.

By the same token, a dollar store can serve the community when it comes to everyday necessities. You can pick up dish soap and greeting cards. You can get toothpaste and shoelaces. It can pinch hit for a grocery store in a food desert.

But it won’t fill your insulin prescription. You can’t get antibiotics for your baby’s ear infection. It won’t supply medicine for your heart condition or high blood pressure.

Filling empty real estate solves one problem created by the collapse of Rite Aid. However, the company’s demise was not just an economic impact on the communities where it operated. It was a medical hardship.

Yes, people can get their prescriptions elsewhere, but that is not always convenient. The people with the greatest medical needs may be among those with the hardest time getting to a pharmacy farther from home.

Derry lost its only pharmacy. Scottdale lost an option that served seniors without transportation.

The circumstances differ from town to town, but the result is similar. The need remains even after the building finds a new tenant.

Communities need businesses. They need investment. They need occupied storefronts.

But they also need services. They need healthcare. They need grocery stores. They need the things that make daily life possible.

Empty buildings deserve tenants. Communities deserve the services they need.

Filling a space is important. Filling a need is essential.