The author of Hebrews applied the Psalm to Jesus because he wanted to make the point that the post resurrection Jesus was now immortal and his "years shall have no end" (KJV). Unlike all prior kings, Jesus isn't a king who's going to die and thereby potentially allow his kingdom to be subject to future misrule by some unrighteous successor. Verse 25 from the Psalm was simply carried over with verses 26 and 27 because it was needed to avoid suggesting that Jesus' "partners/fellows" would parish.
Notice what happens when you omit Ps. 102:25 from the quote in Hebrews 1:
"8 [B]ut of the Son he saith, Thy throne, O God, is for ever and ever; And the sceptre of uprightness is the sceptre of thy kingdom. 9 Thou hast loved righteousness, and hated iniquity; Therefore God, thy God, hath anointed thee With the oil of gladness above thy fellows. [snip Ps 102:25] 11 They shall perish; but thou continuest: And they all shall wax old as doth a garment; 12 And as a mantle shalt thou roll them up, As a garment, and they shall be changed: But thou art the same, And thy years shall not fail."
When you omit verse 25, then the words AUTOI APOLOUNTAI ("they will parish") in verse 11 of Heb 1 naturally refer to Christ's "fellows". These "fellows" are likely one of two groups of individuals, i.e. the holy angels (they are the only "fellows" in context) or Christians who would reign with Christ in his kingdom. Verse 11 can't apply to either of those groups, as the holy angels won't "parish", nor will and Christian co-rulers in the age to come. So the author retained verse 25 from the Psalm so that the "They" in verse 11 of Heb 1 refers to the heavens and earth that would pass away and be replaced by the "new heavens and new earth" (Matt 24:35; 2 Pet 3:13; Rev 21:1).
As someone who accepts the real personal preexistence of the one who became Jesus the Messiah, I would say that Psalm 102:25 can appropriately be applied to Jesus for another reason: He was the 'Wisdom' or 'LOGOS' through whom God created the original heavens and the original earth.