Two years ago, it seemed like Airbnb was bulking up to take on major global online travel agents such as Booking Holdings and Expedia Group. Then the pandemic hit, and it was forced to retrench. That might have been the better move all along.

Booking has been focused on building something of a “super app” for a connected trip that brings all facets of travel into one place. Before the pandemic, it seemed like homestay giant Airbnb was headed in a similar direction. It bought premium homestay platform Luxury Retreats, invested in a print-only travel magazine, a joint venture with Hearst Magazines, later bought hotel booking site Hotels Tonight and hired its first head of transportation.

But last May, much of that was put on the back burner as Chief Executive Officer Brian Chesky said the company was reducing its investment in activities that didn’t support the core of its host community, choosing to focus specifically on homeshare and experiences. It did this, according to Mr. Chesky, because it “could not afford everything” it once could.

Paring down, it seems, has been the key to Airbnb’s business outperformance. At its bottom last year, Booking saw its gross travel bookings decline by more than 90% year on year, while Airbnb’s fell 67%. As of the first quarter, bookings for the online travel agent were still down more than 50% from the same period in 2019; Wall Street is estimating they won’t return to pre-pandemic levels until the fourth quarter of 2022.

Airbnb, meanwhile, is already there. The company said bookings in the first quarter grew 3% from the same period of 2019. By the end of next year, analysts are forecasting that Airbnb will be enjoying year-over-year bookings growth of more than 47%. Its narrowed focus is a sustainable one.

Airbnb CEO Brian Chesky last year narrowed the focus to homeshare and experiences.

Airbnb CEO Brian Chesky last year narrowed the focus to homeshare and experiences.

Photo: Christie Hemm Klok for The Wall Street Journal

Much of Airbnb’s success today has to do with its history of branding itself specifically as a leader in the homestay business. By contrast, for the past few years Booking has been investing in brand advertisements for its more generically named Booking.com, even winning a case against the U.S. Patent and Trademark Office in the Supreme Court to trademark it. But its focus might have been too broad. While Booking said on its fourth-quarter conference call that more than 50% of its total room nights were direct bookings, Airbnb in May said that 90% of its traffic is direct and thus involves no payment to third parties.

Airbnb’s years of investment in its name as both a noun and a verb are now paying dividends. To better compete where the iron is hot in travel right now, Expedia, for example, has been heavily investing in brand ads specifically for its homestay business, reportedly spending more than 10 times what Airbnb did on U.S. ads in the first two months of this year. Expedia, which offers travel bookings from hotels to cruises, didn’t even consolidate its homestay brands into one until recently, finally redirecting HomeAway users to Vrbo.com in June of last year.

Airbnb’s bookings are still much smaller than those of its major online travel-agent competitors. Its relative resilience has shown that bigger isn’t always better, though, especially if you are already in the right place at the right time.

Write to Laura Forman at laura.forman@wsj.com