Alright so let's look at this figure.
You can see when there is glucose AND lactose present, there is no transcription because the bacteria has glucose around which it can use.
When there is glucose and no lactose present there's even a repressor bound.
High lactose concentration allows for production of inducers that remove the repressor, and would allow RNA polymerase to bind. However, RNA polymerase cannot do it on its own, and needs the CAP protein complexed with cAMP to work. We need low glucose concentration for cAMP to be present in the cell.
Therefore the Lac operon will only be active when we have lactose and LOW amounts of glucose.
Having the Lac operon active allows the bacteria to import and metabolize lactose for energy, but it only does this when there is lots of lactose around and not much glucose around. If there is glucose around, it would rather use that because it doesn't need to make a bunch of extra enzymes to do so, so even if there is lactose around but lots of glucose, the bacteria doesn't need to waste energy making all the extra stuff required to metabolize lactose. It only activates this operon when lactose is the only source of energy around.