Why does boolean cut out some shapes and not others
Boolean operations have issues with number precision as they are stored by computers. Booleans are sensitive to overlapping geometry and vertices or other mesh elements being very close to each other.
In general Booleans should be avoided as much as possible while modelling precisely because of the issues you are experiencing.

You could try to switch between different modes and using different solvers, also to adjust the forms of the objects slightly to see if you get better results, but it might also be a very good idea to just choose another method for modelling what you need as you will get nicer topology as well if you model everything using other modeling tools.
Sometimes Booleans just do not work as expected - this is common in most surface modelling applications, not just Blender. So if they work for you in your situation, that's great, if they don't, just use something else.