Switzerland is not in the EU. Also even if it was, it’s not illegal to design/manufacture solutions that don’t comply with GDPR. They just can’t be sold in the EU.
Also, data collection absolutely requires consent, it’s why cookie popups exist on every website.