how does that help? You could still stick a bomb in amongst the trash. Ok, it's no longer enclosed in a container that will make the blast worse but you could stick plenty of malice into a bomb the size of a football which would easily go into that bag.
You're right - it's not going to solve an inherently unsolvable engineering problem.
What it does do is solve a political problem: "What the hell did you do in response to terror attacks" in a way that does't compromise liberty much.
It does make it just that bit harder to stow a bomb, because now the bomber needs to have it packaged properly, and hope that the package doesn't a) ruin the bomb or detonating device and b) that the bomb doesn't slip out and become visible.
It also helps the police identify - they can just machete all trash bags and grab/dump the contents and sort - compared with opening up the can - which might in some areas be locked or difficult to open.
Compared with moves like the creation of the TSA, I prefer this kind of security theatre - at least there's some plot here. It's like locking out the pilot doors from the cabin.