A friend of mine once claimed that Amazon could sell at cost and still profit - they'd charge the customer for an item immediately, but have 30 or 60 days until they had to pay the supplier, so the interest on the payment in the meantime was profit. Not a lot on a $15 collection of toilet paper (for example), but multiple by the number of Amazon customers...
Of course, that skips the costs of Amazon staffing and infrastructure, and I'm sure Amazon sells most items above cost (and potentially some below), but I took it as a good example of how the scale involved meant that few can compete with Amazon.