hi, what's the difference between estaba comiendo and me estaba comiendo? Isn't the me here unnecessary?
Not exactly unnecessary, but not 100% necessary. Depends on how you want to sound
The short answer is that native speakers tend to use comerse with food if they enjoy it
Quiero comer una pizza. = I want to eat a pizza.
Quiero comerme una pizza. = I want to eat a pizza. [more native-sounding]
Native speakers would more commonly use it. But not including it won't affect the overall meaning too much, people still understand what comer means
Side Note: It's important that I say comerse "with food", because... well, comerse tends to be sexual like "to eat" or "to eat out" etc
For food, native speakers are more likely to use comerse instead of regular comer for food that they're eating. I think the meta explanation is something like it's food that they enjoy eating or are happy to eat
Regular comer is fine to use, but it can come across as "the physical process of eating", like "to feed (on)"... and comerse with food has a more social or emotional connotation
The exact linguistics of it is that it falls into something like the ethical dative or the superfluous dative
Those show up with verbs that take on a slightly different meaning when they're given a reflexive, like ir is "to go" and irse is "to go away", or dormir "to sleep" and dormirse is "to fall asleep"
It's when the use of the pronomials [reflexive pronouns] are used in a way that's not truly reflexive [in reflexives the subject and the object are the same; the subject does something to itself]. That means that they use the reflexive endings but they don't really come across as reflexive... comerse with food doesn't come across as "to eat oneself" so it's not truly reflexive, in other words.
But like I said there are some verbs that will take the reflexives and sort of alter the meaning
In English we tend to do that with prepositions; "to go" and "to go away". We still understand "to go" but the directionality and distance is subtly different. It's the same with "to fall" and "to fall down", or "to move" and "to move away" or "to move out"
By adding that extra word we change the intended meaning, to the extent that we could understand the base verb [ie "go", "fall, "move"] but we might be missing context
That's the function of those reflexives there
It doesn't mean anything as far as a literal grammatical thing, but it does subtly change the meaning.
If you're presented with a verb with reflexives and it doesn't really mean "oneself/himself/herself/themselves" you're probably dealing with one of those types of verbs
As an example: acordar is "to agree" normally, but acordarse is "to remember". This is one where if you didn't use the reflexive, the meaning would change completely and people would be confused. So this is one of the ones you would want to just memorize.
Another subtle one: morir "to die", but morirse is commonly used as "to pass away" where the mood is more "suddenly" or "unexpectedly", at least in my experience. As a command, morirse [as muérete as a tú command] is like "drop dead" and it's more something said in anger. But like comer, if you used one over the other, people would more or less understand even if the tone was slightly different
So long story short, it's not a big deal with comer/comerse with food. But you've stumbled into a very murky linguistics thing in Spanish
This is one that isn't really taught [my info comes from more grammatical/linguistics sites and journals].
Native speakers say comerse with food without really thinking about why. Native speakers know to do it, and most wouldn't really know how to explain why if they didn't look into the grammar/linguistics of it
It's just one of those things that "feels right" and "sounds right"