The pairing with Parashah Vayechi, whose closing chapters record Jacob blessing each of his twelve sons before his death and instructing them plainly about his own burial, rests on the shared genre of the two accounts: both are a patriarch's final words, delivered with full awareness that death is near, addressed to sons who must carry the family or the nation forward once the father is gone.
Jacob's blessings assess each son individually, some with praise and some with sharp rebuke for past conduct, much as David's final instructions to Solomon include both an exhortation to righteousness and a settling of specific old grievances, Joab's bloodshed and Shimei's earlier curse, that David himself had been unable or unwilling to resolve while he still needed their support.
Both accounts also close on the same practical note: Jacob is buried in the family tomb in Canaan exactly as he instructed, and Solomon's throne is established securely exactly as David intended, so that in each case a final act of paternal instruction is followed immediately by its faithful execution, closing one generation's story cleanly before the next one properly begins.
Both accounts also share a concern for unfinished business a father cannot fully resolve alone: Jacob's blessing of Reuben, Simeon and Levi openly recalls past wrongs even as he blesses them, just as David's charge to Solomon openly names old debts of loyalty and old grievances still awaiting settlement.