Still, in a world where 3D printing is sold as a happy path solution to everything, putting glue on a couple of COTS plastic pieces sold for about $0.10 seems like an absolute no-brainer.
Using glue on small PCBs doesn't seem very sensible to me. I guess it's asking for too much to sell some lego bricks with simple ways of attaching a PCB?
Well, you can. You just need to attach the accessory to a lego piece that suits your fancy, and you're done.
https://www.lego.com/en-us/page/static/pick-a-brick