What happened

Shares of Airbnb (ABNB 0.75%) were moving higher last month as the leading home-sharing platform benefited from a generally rising tide in tech stocks, some positive analyst chatter, and a lawsuit to fight back against New York City's restrictions on short-term rentals. Continued evidence of strong demand in the travel market also seemed to lift the stock. 

As a result, the stock finished the month up 17%, according to data from S&P Global Market Intelligence.

So what

Airbnb stock got a bounce to kick off June after the company sued New York City over a new law restricting short-term rentals and requiring hosts to register with the city.

In a filing, Airbnb said the new rules amount to a "de facto ban" on short-term rentals. The move is the latest step in a long-standing battle between the city, which is its biggest market in the U.S., and Airbnb. Since regulation is widely considered the biggest threat facing the company, investors responded positively to the move.

The following week Wedbush initiated coverage with a neutral rating and a price target of $130, implying modest upside to the stock. Analyst Scott Devitt said he likes the stock "very much on a long-term basis" but thinks investors should wait for "a more opportune time to invest."

The following week, Airbnb's stock jumped after one analyst issued a bullish note on the stock, and it won a delay in NYC's registration plan. Needham said that its research indicated that average daily rate trends were improving last month, a positive sign for the summer season. 

Additionally, investors cheered news of the delay in New York's rental registration deadline, which signals an initial victory following the lawsuit at the beginning of the month. 

Now what

As a business, Airbnb has delivered phenomenal results over the last year or so as it's benefited from the recovery in travel, but the stock has been hampered by the bear market and last year's sell-off in tech stocks. Even after last month's rebound, the stock is down more than a third from its all-time high in early 2021.

Towards the end of June, a chorus of naysayers raised their voices once again after a viral tweet said that bookings were down sharply in some key U.S. markets. However, that data now seems to be inaccurate.

Airbnb remains controversial, but the business has become a profit machine. If it can continue to do so, the travel stock should keep gaining.