WPS is a thing that's exactly what you describe. People suggest disabling it these days because tools like reaver can use it to access a network in a few minutes.
QR codes with wifi details kind of obsoleted it in the past few years. (last three routers I've gotten even came with stickers with the default password as a qr code)
What I'm disappointed by is the lack of adoption of wifi standards that are encrypted, but don't require authentication to join. It's always a choice between no encryption, or password+encryption on hardware I've encountered.