Think about what diversity means; if habitat 1 is mostly species A what are the chances you'll randomly pick an animal that ISN'T A? On the other hand, if habitat 2 is equal parts species A and species B, what are the chances now?
Lower chances mean lower diversity. This holds true for all diversity indices no matter how they choose to quantify those chances or probabilities.
In other words, if hab1 is mostly A's, it's going to have low diversity; while hab2 will have more diversity.