Peter. Of course some particles will get past your bandana when you sneeze but it will limit the number of droplets that pass and hopefully reduce the chances of you infecting someone. I repeat that the simple masks are not, and never have been considered personal protection but are used to limit (if properly worn) the possibility of passing bacteria etc to others.
As you quite rightly point out personal protection requires a properly fitted N95 mask or better. Those with valves for exhalation (mainly used in industrial environments) will give even less protection for others than a simple mask or bandana. Those without valves will no doubt give better protection for others than a simple surgical mask.
At the end of the day you can't ask everyone to spend the money to buy and keep changing the expensive N95 masks, there would not be enough available anyway. In Italy a law was introduced to stop profiteering on surgical masks and they are now readily available at 50 cents each.
It is all about risk reduction, not absolute prevention.
There are plenty of well informed studies on the subject. You might like to read
Still Confused About Masks? Here’s the Science Behind How Face Masks Prevent Coronavirus