Say West plays in 3NT, with the lead of the D5.
It is likely that North has DA9xx(x). If Declarer wins with the DJ, he will probably be limited to 1 diamond trick, and he will have just 1 entry to Dummy (which he would waste if he leads another diamond). So it is better to win the lead in Dummy with the DK. If Declarer continues with diamonds, he will certainly establish another diamond trick, but that is all.
urther, he will have just 1 opportunity to lead clubs or hearts from Dummy. However, if he now leads a club, he will have a second opportunity to leads clubs when in Dummy with the SQ, and if clubs are 3-2 he will have a 3rd entry in the 4th round to take the heart finesse. Declarer will then make 10 tricks.
Consider the play if Declarer wins the DK and continues with the DQ. North wins, and might well return a spade. When in with the SQ, Declarer might cash another diamond, in which case it is most likely that the Defence will take 2 diamonds and 2 clubs, leaving Declarer with 9 tricks.
If Declarer leads a club when in with the SQ, he might still make 10 tricks. But if he finesses the HQ, he might be restricted to 5 spades, 2 hearts and 1 diamond, 8 tricks in total.