Compared with English, it's much easier to make a compound verb in Korean, so a lot of single verb expressions in English are expressed as compound verbs.
For example, getting groceries is usually thought of as a two part action of buying it at the store and bringing it home to stock it, so we often say 장을 봐 오다, where 보다 corresponds to buying and -아 오다 to bringing it home. This is especially common with the movement verbs like 가다, 오다, and 다니다.
Many common actions are expressed this way:
- 좀 더 있다(가) 가세요 = stay longer and then leave.
- 한 번에 10만원 어치를 사 가는 손님들 = customers buying a hundred dollars' worth at a time.
- 한바탕 운동하고 왔다 = I did some massive workout (and came home).
- 저 사람은 온갖 거짓말을 하고 다닌다 = He goes around telling all kinds of lies.
(There are different ways to connect the verbs like -아/어, -고, -러, -려고, -다가, etc depending on the meaning.)
So in your example, 먹을 거 사 오려고 하는데 is the natural way to say it to someone at home.
It implies the speaker is going to get something to share it with the person listening.
If you just say 먹을 거 사려고 하는데, it might sound like you're thinking of buying it for your own purpose and not for the people at home.