It's like most things with supply and demand.

If you have 31k fans and 21k stadium capacity then around 66% of your fans can get in to see the game so there isn't much competition to buy tickets.

If I have 1.14m fans and a 111k stadium capacity then only around 10% of my fans can get in and therefore competition for tickets is greater and I can charge more.

To be honest I've never really bothered about revenue from ticket sales. If you get into the Champions league each season then prize money and learning when to sell players at the right time so that there is a good auction should be enough to keep your cash high.