It likely doesn't go in the whole wall, more like in a small container friction fit between tiles. That way you can empty it once it's full (not too soon, admittedly)
Edit: there was a comment here about two feet of blades, so I was wrong, it does go into the wall and it is a 'fuck the future me' kind of thing 😅
I use these blades to shave almost daily. I use approximately 40 each year. I would never be able to fill up a wall with these, not even during 10 lifetimes
It's not so much about filling it up, but when someone goes to eventually renovate the place lol. Open the drywall and just have a bunch of blades to clean up... Or if you get a leak and have to now deal with a puddle of rusty blades.
I want to say that possibly one of the medicine cabinets had a smaller container that collected them at some point, but again, it was still fixed behind the wall lol.