The economics of movie distribution are quite complex. It is entirely possible that a particular offering doesn't end up being salable to cinemas even if that was the original intent. This could be because it is just plain bad or contains some controversial content which puts distributors off or it suffered some mishap during production like key personnel leaving the project or being fired midway through production.
The precise mechanics of this will depend on what contracts exist between producers and distributors at what point in the process the distributors reject it, but it is entirely possible that no distributor ends up wanting it. It this point the producers could either cut their losses and scrap the whole project or try to claw back some revenue with a video release.
The key point here is that there is a finite amount of cinema scree time available in any given year and cinemas need to generate a certain amount of revenue to stay in business but pressing a few hundred thousand DVDs is not that expensive in the context of the total production budget of a movie.
There is also a whole industry of movies which are never intended for theatrical release. A lot of these are made as cheaply as possible and generally follow a fairly well trodden formula. Perhaps the best example of this is Bridge of Dragons which appears to have been cobbled together from whatever sets and costumes the producers could find lying around unattended. Quite a lot of action and martial arts movies fall into this category. They aren't necessarily bad as such but tend to lack the pull in terms of big name stars and production values to compete with big budget films in cinemas nor are they likely to win any awards. But in this case the straight to DVD route is a deliberate business model rather than a failure as such.
This is a slightly different category than small independent films which, while they can't compete with big budget blockbusters in generating overall revenue may have more of a chance of attracting interest and funding on the basis of artistic merit. Equally in some cases tax breaks and grants may be conditional on some sort of theatrical release so a limited release may make financial sense even if they don't collect that much revenue.
Made for TV films are different again as they are often commissioned directly by the broadcaster and in some cases even made in-house. In the UK the BBC and Channel 4 commission a small but significant number of films, sometimes in collaboration with other commercial entities. These are not by any means necessarily poor quality and often represent a middle ground between the mega budget Hollywood productions and more niche independent films. For broadcasters with a public service remit this may also be part of a deliberate strategy to provide opportunities for young and emerging directors, writers etc. Often these will be things like adaptions of novels or stage plays and historical/period dramas which have some established literary or cultural merit and tend to be relatively cheap to produce to a good standard.
There is also the fact that subscription TV providers like Netflix are becoming increasingly confident and ambitious in commissioning their own content for their platforms. This tends to be more often in the form of series, albeit with significantly higher budgets and production values than traditional TV series and often with more of an overarching story arc than stand alone episodes.