A couple of reasons:  1. Your cast iron pan is incorrectly/poorly seasoned. How to restore, season and clean your cast iron skillet, seasoning builds over time too, don’t ruin it with incorrect washing of your skillet or highly acidic foods like tomatoes. 2. Your cast iron pan was not preheated enough, ensure it is preheated so when oil is added it shimmers and spreads easily over the base of the pan, then add your food. 3. Fat, ensure you add some fat to aid heat transfer contact between the food and pan, also fat makes things tasty and it aids polymerisation which in effect is when fat is baked onto the cast irons surface building up the seasoning.