Wait until you run into the other usages of the word!
But frying food is just using direct heat and oil to cook, regardless of the depth of the oil. And, you’d be surprised how deep the oil is when some people fry eggs or rice. It isn’t too unusual for eggs to have enough oil that they more or less float on top of it, though that isn’t done for scrambled eggs.
The word fry is also used to mean baby fish, electronics being damaged by surges or excess voltage/amperage, and sometimes even to indicate that someone is inebriated via drugs other than alcohol. Plus there’s irregular uses of the word.