Context would seem to offer a consistent answer to help in understanding this text, while external applications the author would have known of concerning the Eternality of the Son of God will be the the foundation of such a statement, as
1 In the beginning was the Word, and the Word was with God, and the Word was God.
2 The same was in the beginning with God.
3 All things were made by him; and without him was not any thing made that was made.
And this witness accepted in the manifestation of Jesus Christ:
14 And the Word was made flesh, and dwelt among us, (and we beheld his glory, the glory as of the only begotten of the Father,) full of grace and truth.
15 John bare witness of him, and cried, saying, This was he of whom I spake, He that cometh after me is preferred before me: for he was before me.
16 And of his fulness have all we received, and grace for grace.
17 For the law was given by Moses, but grace and truth came by Jesus Christ.
Please notice verse 2 The same was in the beginning with God.
While the before sited scripture, is not part of the body of Hebrews, the theme of Hebrews has offered the witness to Jesus Christ as an Eternal person with the Father similarly to the testimony of John in saying " The same was in the beginning with God." in saying at the enactment of the Epistle:
1 God, who at sundry times and in divers manners spake in time past unto the fathers by the prophets,
2 Hath in these last days spoken unto us by his Son, whom he hath appointed heir of all things, by whom also he made the worlds;
3 Who being the brightness of his glory, and the express image of his person, and upholding all things by the ** word** of his power, when he had by himself purged our sins, sat down on the right hand of the Majesty on high
Thus, in context the author of Hebrews is proclaiming a doctrine of pre-existance which is evident from the on set of the context, similar to what is conveyed by the apostle John.
What impact does this sameNess have on understanding the context of the text in focus?
:8 Jesus Christ the same yesterday, and to day, and for ever.
9 Be not carried about with divers and strange doctrines. For it is a good thing that the heart be established with grace; not with meats, which have not profited them that have been occupied therein.
It seems likely that the whole focus of verse 8 is explained in verse 9, that the Jesus Christ who was the Son of God, who was the Word by whom also God made the worlds; and by whom Grace and Truth has always been given in the eternal purpose of God, as witnessed in John 1:14-17 is here being affirmed again Be not carried about with divers and strange doctrines. For it is a good thing that the heart be established with grace.
I tender from this passage in it's hollistic context beside supporting evidence from John 1, that this statement is meant to affirm Jesus Christ's:
1. Eternality in any age
2. Stable and familiar doctrine in any age
3. Grace Established in the Heart of any age
And this Doctrine of Grace only found in Christ as Eternal, stable, familiar to the heart which is occupied by it is set opposed to the uneternal and unstable and unfamiliar doctrine which is as good (meats), which have not profited those that have filled them selves with such.