Ford wanted to prop up their numbers on the F-150, their pride and joy, and the Ranger sales were declining. Supposedly enough that what money they were making was drying up. That seemed to work for a while until the market changed.
When they brought back the Ranger, their car sales were drying up. So, now they are focused on trucks and SUVs with vans in the mix.
It all comes down to money and the market. What are most of their customers buying and where are we starting to lose money?
IMHO the Ranger's previous demise was partially Ford shooting themselves in the foot too.
Ranger was last redone in '98, it should have been refreshed again in the mid 00's. I think it was around '06 Toyota finally dethroned it as the top selling compact pickup.
But no, Ford just kept running basically the same 1998 truck (with a new grille now and then) and wondering why "the market changed"
Up until nearly the end the Ranger was still outselling the Titan. IMO people wanted them but maybe they didn't want something that looked like a 1993 truck from the back...
I read somewhere Ford intended on killing the Ranger in the mid 00's but they still sold so well they just kept the line running.