It doesn’t make sense, does it?

Amazon is the king of online retail and the world’s biggest seller of books. The company has dominated the bookselling industry for years and is a constant threat to the survival of its largest competitor, Barnes and Noble.

And yet, according to the American Booksellers Association, an industry trade group, between 2009 and 2015, more than 570 independent bookstores opened in the U.S., bringing the total to more than 2,200—a 35 percent jump after more than a decade of decline.

How is this possible?

The first reason is niche. Amazon, like any big company, has to appeal to a large audience in order to sustain its growth. Smaller businesses like independent bookstores don’t have that kind of pressure. They can choose a specific niche—cooking, children’s books, politics—and be really excellent at it. They then become experts in that niche and attract authors, speakers, academics, and fans of their genre to their store.

These niche specialty shops don’t necessarily have to have all the inventory or even all the answers—they just need to establish themselves as the one-stop-place to get these answers. When your small business serves a niche—like coffee, fashion, an Italian restaurant, a mysteries bookstore—you’ll never be a very big business. But that’s cool. You can still be profitable and earn a nice living. And also have fun doing something you really love.

The second reason is diversity. It’s no longer a brick-and-mortar or an online merchant world. Today’s smart booksellers are realizing that to succeed you have to operate in both places. That’s something the managers at the Friends’ Community Bookstore in Marina, Calif., learned. “We get all sorts of people in here,” the store’s manager told the Monterey County Weekly. According to the report, business has been “booming since the nonprofit opened this outpost in November 2017, selling around 12,000 books. And that’s just in-store.” But that’s not all. The shop has also logged $18,000 in online sales through its Amazon merchant store.

You don’t have to limit your wares to just books, by the way. Some stores, sell other, non-book items like candles, cards and clothing.

And then there’s service. I once had a problem with a product I ordered from Amazon (the package never arrived) and wound up spending hours on the phone with a bunch of very nice Amazon customer service representatives before finally canceling the order altogether. Amazon is, in my opinion, very good at customer service and has very stringent requirements that its merchants must abide by in order to get their products sold. But there is nothing that compares to dealing with the owner of the actual business when there’s a service issue—and that’s what draws so many loyal customers to independent bookstores and small businesses in general.

Which brings me to the biggest reason why many independent booksellers are succeeding: community. No offense to Amazon, but what community does it have? Are people seeing each other face to face? Sharing ideas? Sharing food?

Many independent bookstores have established themselves as leaders in their local community and outspoken defenders of not only their trade but also other Main Street merchants. “It’s like a jewel in the city,” a customer of Olive Tree Books-n-Voices told The Valley Advocate. “I come here to get books for my granddaughters, to get cards, or to talk to Zee [the owner]. Or anybody who’s in here. It’s a place where folks come together and talk about life.”

People love to do business with like-minded people and we love to talk about the things we enjoy—be it food, clothing, or books. I believe that building a close community is something that only a small business can do.

The lessons here aren’t just about booksellers. It’s about any small business facing competition from the big box store or online giant. There are some things these giants can’t do—or can’t do very well—and that means big opportunities for you and me.