They are not in the earliest manuscripts, but may have been repeated from 1 Cor. 10:26 for emphasis.
"and if any one may say to you, `This is a thing sacrificed to an idol,' -- do not eat, because of that one who shewed [it], and of the conscience, for the Lord's [is] the earth and its fulness:" (1 Cor. 10:28, YLT)
"...for the Lord's [is] the earth and the fullness of it." (Interlinear, Source: Biblehub)
The sense is that the animal was created by YHWH, not the idol, and is therefore originally provided by the Lord. However, eating something sacrificed to an idol in front of a pagan, or in front of a weak believer may cause offense in the weak minded. And as there is plenty other food that the Lord has provided it is no hardship to forego the food sacrificed to an idol.
Excerpt from Barnes" Notes on 1 Cor. 1:28 -
"For the earth is the Lord's ... - See 1 Corinthians 10:26. These words are missing in many mss. (see Mill's Greek Testament), and in the Vulgate, Syriac, Coptic, and Arabic versions; and are omitted by Griesbach. Grotius says that they should be omitted. There might easily have been a mistake in transcribing them from 1 Corinthians 10:26. The authority of the mss., however, is in favor of retaining them; and they are quoted by the Greek fathers and commentators. If they are to be retained, they are to be interpreted, probably, in this sense; "There is no "necessity" that you should partake of this food. All things belong to God; and he has made ample provision for your needs without subjecting you to the necessity of eating this. Since this is the case, it is best to regard the scruples of those who have doubts of the propriety of eating this food, and to abstain." Source: Biblehub
Excerpt from Gill's Exposition on same -
"the earth is the Lord's, and the fulness thereof; which words are neither in the Syriac version, nor in the Vulgate Latin, nor in the Alexandrian copy, and some others, and are thought by some to be added, from 1 Corinthians 10:26 though the repetition of them is far from being impertinent; since they contain a very good reason why such a man should abstain from things sacrificed to idols, seeing there is such a plenty and variety of creatures for his use, which he has a right to eat of; and therefore is under no necessity to eat of such sacrifices, nor is it any hardship upon him to forbear the use of them." Source: Ibid.