Deliveroo today announced that it will be leaving Spain's market due to limited market share, long-term investment risks and uncertain returns.The company is an on-demand business based in the U.K. and went public in 2021. Initial shares fell, raising concerns about the potential value of both on-demand companies as well as tech firms listing in London. Deliveroo shares have recovered and its second quarter earnings report showed that it raised its expectations for gross order volume growth from 30% to 40% to 50% to 60%.You may be shocked that Deliveroo would leave any of its 12 current markets due to rising growth expectations and an improving public-market value. Deliveroo appears to be concerned about changes in Spain's labor laws, which will increase the cost of its operations, which is unacceptable given its small market share.Remember that Spain passed a law in May which was generally agreed to by March, requiring on-demand courier companies to employ their couriers. This arrangement is what on-demand ride-hailing and food delivery companies have long fought for. Many on-demand businesses are not profitable without hiring couriers and could increase their costs. Startups and public companies that rely on freelance delivery workers are concerned about the possibility of worsening economic conditions.Let's examine the Deliveroo statement in order to understand better the company's perspective. Here's the opening paragraph:Deliveroo announces today that it will consult on the possibility of ceasing operations in Spain. Deliveroo operates in 12 markets around the world, with the majority of its gross transaction value (GTV), coming from markets where Deliveroo has a #1 or #2 market position.Translation: We are likely to leave Spain. The majority of our orders come from markets where we have a strong position (the company competes in different markets with Uber Eats and Glovo). Spain is not one of our leading markets.Spain is less than 2% in Deliveroos GTV H1 2021. The Company determined that to maintain a top-tier position in Spain, it would require an unsustainable level of investment that has uncertain long-term returns. This could have a negative impact on the Company's economic viability.Translation: Spain is a small market for Deliveroo. It would be expensive to gain a large market share in Spain, and the company isn't certain about the country's long-term viability. It is difficult to plan out how to invest to gain market share from a country where your company is less profitable.El Pais says Deliveroo's decision comes because it ran into a deadline for worker reclassification. This may have contributed to the timing.Deliveroo then spends three paragraphs explaining how it will help workers in the event it leaves Spain's market. The conclusion is as follows:This proposal will not affect the full-year guidance previously communicated on Group annual GTV growth or gross profit margin.Fair enough.Over the years, on-demand companies have argued that labor laws changes that would increase costs in hiring couriers and paying them more would render certain markets uneconomical and force them out of business. Given its small order volume, Deliveroo is able to exit with minimal cost.