it seems that there is a rule at ABC if a show is in danger of cancellation (I guess they wanted to avoid another Nashville fiasco....but then I remembered Castle ended the same year that ABC pulled the plug on that show and they already had two endings prepared....and Nashville had an alternate ending at the airport ready) anyway my point is I'm not surprised with Agents of Shield because it has been struggling for a long time
http://tvline.com/2018/02/27/agents-of-shield-season-5-finale-series-finale-cancelled-or-renewed/