The physics aspect is that the most straightforward way of assembling such tiny and lightweight devices and have them be at least somewhat waterproof is to glue them together.
The economics aspect is more important.
I just had my AirPods break last week. I took them to an Apple store and they were replaced under warranty for $0. This still felt expensive, because it took half of my Saturday to drive to an Apple store, sit around while they tested the device, and then drive home. Simply having my free time wasted is -- to me -- a comparable opportunity cost to simply paying for a pair of replacement AirPods.
In general, everything breaks, and eventually is simply not worthwhile repairing because replacement with a newer model with more features is a more attractive proposition. Making things repairable is more expensive, so there's a tipping point where it is counterproductive for manufacturers to design their products for longevity.
This tipping point changes with the wealth of nations over time. As people's time becomes more and more expensive, bothering to repair cheap gadgets becomes less worthwhile. Paying for someone to repair them becomes increasingly expensive.
Repair is a service, electronic gadgets are products.
As the cost of services increases relative to manufacturing, the tipping point moves.
Of course, there's always going to be the complainers bemoaning the changing times.
These complaints are literally stating: "I don't like manufactured products getting so cheap that they can be simply thrown away! I prefer the good old days of relative poverty where people had to resort to expensive services to repair even more expensive products! I miss those times!"
Don't listen to the Luddites, embrace the increased wealth of nations made possible through manufacturing automation.