I think Heartbeat fell out of favour at ITV, for some unknown reason.
Look at the kid glove treatment given to Wild at Heart: an uninterrupted run every winter, every episode lovingly sandwiched between two editions of Dancing on Ice. If Heartbeat had that treatment, it would be getting around 7.5-8m viewers per episode.
Conversely, if Wild at Heart got split into runs of three or four episodes in spring and summer, with no viable lead-in, it would be rating a lot lower than Heartbeat has recently.
And, I dont say that as a Heartbeat fan. I always thought it was a pile of old cobblers, but it was cobblers that did the business ratings-wise until ITV started treating it badly.