Why were miners still mining BTC at times when BCH was 2-4x more profitable to mine? From August 2017 until mid November (prior to BCH's hardfork with the difficulty adjustment algorithm) there have been some occasions (notably end of August, beginning of October and mid November prior to HF) where mining BCH was 2-4x more profitable than mining BTC. See: https://bitinfocharts.com/comparison/mining_profitability-btc-bch.html#1y

You would expect that in such cases, where mining one coin compared to the other is much more profitable, all miners would switch to the more profitable coin. However, this did not happen, even when BCH was 4x more profitable, there was still hashrate on the BTC chain (see: https://bitinfocharts.com/comparison/hashrate-btc-bch.html#1y).

What could be a possible explanation for this? I am looking to hear a miner's perspective on this.

Thanks in advance!
Some miners may be ideologically opposed to BCH and thus will not mine it or help it in any way. Others may be too lazy to switch their hash rate to BCH or do not trust any BCH mining pools so they do not switch. Yet others may simply have been unaware of these profitability spikes and were not available to switch their mining hardware to BCH. Given that the change in profitability was only for a very short period of time, some miners may not have had the time in order to switch their hardware, or the effort was not necessarily worth it.

Additionally, mining on BCH means that they would be mining a much less liquid currency. BCH does not have nearly the same trading volume as Bitcoin and mining BCH means that the miners may be stuck with a coin which they do not want and may even lose value compared to what they would earn with Bitcoin.

It is important to note that even if not all miners switch, some still did which you can see in the hashrate charts. This did happen fairly frequently as the EDA could be gamed so that mining on BCH briefly was more profitable than Bitcoin, and several miners did do this.