All i know that mining a coin will get you earned on the transaction fee, If then why they mined so many BTC that time if there are no transaction happening.
It's is very expensive to mine bitcoins,setting up the mining rig etc.
And to answer your question,if there are less transactions,the price of bitcoin drops as well as the hashrate which makes mining bitcoins less profitable.
The more reason why miners usually shut down their mining rigs in such periods.