Do you need a perscriprion for CPAP and similar products?

Which PAP products require a prescription? I’m a bit confused why I would even need a prescription in the first place.