Generally speaking, if you have the foresight to anticipate that people might want a commodity, and you put your own money on the line to try to profit from that — well then, good for you. If the demand doesn’t materialize, you’ve lost your investment. If it does, you make a profit. That’s the way markets work.
The same rules don’t apply when you’re trying to profit off a catastrophe.
We all get a warm feeling when brewers stop production of beer and use their supply lines to provide millions of cans of water to people after a flood, or hurricane. Or when Chick-fil-A employees take free food to people stuck on a highway after a horrible wreck.
But when some guy tries to hoard lots of hand sanitizer to sell it to people during a health crisis, the public collectively gives him a middle finger.
Also, you don’t need hand sanitizer. Washing your hands for 20 seconds with soap and water is more effective anyway.