one could reasonably argue otherwise. let's take the example of toilet paper in the early weeks of quarantine. with or without the action of scalpers, such a massive shift in demand was going to cause toilet paper to go out of stock regardless. without scalpers, you are shit out of luck when this happens (perhaps literally). with scalpers, you at least have the ability to buy it at an eye-watering price. even before you run out, knowing that you have to pay $20/roll is a strong signal that you ought to use one or two squares per wipe instead of 3+.
On a hunch I'd say a scalper would purchase more off the shelf than a panic buyer, because with the goal they have in mind they a) want a large quantity to resell to a large number of people and b) want to drain shelf stock to increase their odds of success.
Hoarders/scalpers are not aiding price discovery, they are manipulating the price by artificially changing supply or demand. They don't have to do so sustainably either.
And all of that is leaving aside that the goal of a society is to maintain the society over time and in aggregate, not to maximize value extracted from every individual transaction.