Those countries may also ratify EU laws if they wish. I think the UK has something similar to GDPR and Switzerland also picks and chooses which laws it thinks make sense.