I tried this with eBay - I bought a few second-hand books for a few pence each, added postage and packing, plus a very small profit margin. My reasoning was that, if it worked, I could scale it up and turn it into a side hustle, but the one book I did sell was more hassle than it was worth, what with packing it, addressing it, taking it to the post office, etc. The thought of having to do that enough times to make a decent profit was dreadful.
I can see why people would choose Amazon over eBay, perhaps, if they used Amazon's fulfilment service...