On the Food network they boil potatoes, but they poach carrots. They poach turkey, but they boil eggs. They sauté’ onions, but they fry eggs in the same pan. Likewise, they fry hash browns, but they sauté’ onions in the same pan before adding the potatoes.
I can go on for days.
It usually has to do with what chemical process happens to the food in question. Not all foods react the same to being dunked in boiling water. (Although I couldn’t tell you what the difference between potatoes in boiling water and carrots in boiling water.) In the case of onions vs eggs, the same process is 1) extracting the water and using it to make sauce, with the onions, or 2) boiling off a tiny amount of liquid and heating the proteins to solidify them, in the case of eggs. Same method, wildly different chemistry.
Sometimes it has to do with how long that cooking method is applied, since a different thing happens. For example, you can poach OR hard-boil an egg; same method, different amount of cooking time.
In short, with a few exceptions, it’s not about what process you’re applying to cook the food, but about the result that it achieves in the food item.