On the federal level the FDA has required that buyers provide a medical assessment stating their need for a hearing aid. However, buyers older than 18 have been allowed to waive that requirement.
On the state level, many states have had prescription requirements. The FDA has ruled against such state laws several times but many laws have remained on the books. While in theory unenforceable, they have created a lot of FUD for prospective sellers.
The industry (audiologists and hearing aid manufacturers) has continuously reinforced the view that prescriptions are needed and in the buyers' interest.
Personally, I do think the new OTC regulations make the situation clearer and have the potential to improve products (assuming products become easier for users to configure themselves) and lower prices (as it's not only the audiologist's service buyers have paid for, but bundling of examination+device+followups has allowed higher pricing for the devices as well).
(See https://www.audiologypractices.org/state-laws-and-hearing-ai... and https://fda.report/media/75418/Regulatory-Requirements-for-H...)