Even when the primary risk is that you’ll build the wrong thing, there would be cases where paying a market research firm to compile advice on that topic that balances current customer requests against other things, like forecasts of industry or demographic or supplier or political trends, is a vastly better use of time than having the founders sit and use a product and develop their own idiosyncratic (and likely ignorant) idea of what to improve, or to oscillate between different focus points based on possibly incoherent or inconsistent customer feedback.
I have yet to meet a startup for whom hiring a market research firm and depending upon the results in the report gave them useful information that turned into a big opportunity. There's a simple reason for this: if such a report exists, then a big company who actually has money has already hired that market research firm and executed on those results, and that market opportunity is closed.
The same would be true of any activity the start-up could do to gather intelligence on a market opportunity, whether it is incubating a prototype and obsessing over user feedback, consuming market research, getting feedback from potential investors, etc. etc.
If doing X could reliably lead to growing the product revenue underpinning the startup, then there is an arbitrage opportunity for any better capitalized actor to swoop in and do X first/better.
I also think your claim is implicitly very narrow in imagining a certain type of startup.
For example, my sister opened a popup restaurant that participates in a weekly farmer’s market in a large public park near where she lives. She absolutely spent money on marketing reports and restaurant consulting to understand if her ideas for menus and how to operationalize cooking the food quickly, on-site had any likelihood of being profitable.
The idea of just piloting the menu and kitchen strategy, then hoping to pivot based on feedback, makes no sense for a startup business like that, where you need hard research data on the market before even prototyping a product.
The difference is that if you do all the research yourself, nobody else on earth knows it, and hence nobody is going to sell it to the highest bidder. If you've discovered a huge untapped market that can be served in a scalable way, you're certainly not going to sell that information; you capitalize on it yourself.
A popup restaurant is not a startup in the sense that is normally discussed on this site - namely a scalable business that focuses on owning an asset that you can sell access to lots of different customers, over and over again. When you own a popup restaurant (or any other small service business), your customer base is limited to the number of people you can physically serve. If, however, you own a software app that is the go-to place that people go for meals on demand, you can sell access to those customers to many small popup restaurants, and charge them a good fraction of the additional profits generated by customers you bring in the door.
That has a big effect on the market dynamics. There's room for many popup restaurants, because each is limited to a small number of customers. There's only room for one or two Yelps, or DoorDashes, and they all tend to get in each other's business, because there's no limit to the number of customers they can serve. If there's going to be thousands of companies in your space anyway because each of you is limited by your work ethic, there's no harm in buying information from a commodity information provider (who, BTW, is going to be making a lot of money). If there's only going to be one winner in your space, you better be it, and the existence of a market research firm who's aware of your market is a good indication that you're already too late.