It's unfortunately a death spiral... costs increasing, demand decreasing, therefore prices go up, driving demand down even more, repeat, until no more demand exists.
I do believe that this cycle can be broken, but it will require Kodak and/or Fuji to spin off their film divisions into separate companies that downscale their production to the niche market that exists today. Ilford/Harmon have been quite successful at keeping their b&w film lines going, without any product removals, for a good while, and the annual ULF special order window seems to be a great way to keep the larger film sizes continuing in production as well.