It is often right to run the long suit. In this case, declarer saw that winning with the ♦K and running clubs would force him to make three discards. Then West would gain the lead in hearts, cash the other top heart and play on diamonds, unblocking the queen. Eventually, West would take two spade tricks to defeat the contract.
There was another consideration: Declarer did not want East to gain the lead, so, he played low from dummy at trick one and took East’s ♦8 with the king. The play to the first trick marked East with the ♦J (West would have led the ♦Q when holding the jack too and East would have played the queen if West had held only the jack.)
The bidding made it certain that West had the top two hearts. With that in mind, declarer played the ♥Q at trick two as part of his plan to develop a heart as his ninth trick. West took this with the king and continued with the ♦Q. Declarer ducked, then took the diamond continuation with dummy’s now-bare ace, throwing a low spade from hand. Again, declarer did not touch the club suit, instead playing a low heart to his jack. West took this with the ♥A and exited with a club. Declarer now claimed nine tricks: a heart, two diamonds and six clubs. Of interest is that if West had led the ♦Q at trick one, declarer would have had to duck in both hands to keep East off lead. Otherwise, the contract would have failed. The full deal: