Deficit financing is often the norm for scripted television, this came during the Post Network Era.
[1] Television deficit financing also helps to minimize the substantial risks and costs of developing programs for the networks and gives studios initial benefits as well.
The studio bears the difference between production costs and licensing fees, but recoups significantly more money if the show is sold in syndication.
There is both good and bad to deficit financing, it gives the studios the opportunity to gain major rewards, but they are also taking most of the risk.
If the network orders enough episodes of a show, the studio can then sell the series to other markets.