An Airline is entitled to do whatever it wants. Its mandates are published in a charter, on public display, but broadly, yes, they can withhold a boarding pass for any reason. They want their passengers to be happy, and so they generally won't deny you boarding, but there are many reasons for denying a boarding pass.