There are various reasons airlines may chose to stop flying a route. While its often financial there are usually underlying reasons that drive the decision. While financial models are drawn up when planning routes, outside factors may effect the finances in unpredictable ways.
Lack of travel: if a destination becomes unpopular or a city sees diminishing travel an airline may chose to stop flying the route, this may come after various scale backs.
Airframes get decommissioned: The economics of a route are often tied to the airframe used to fly it. Historically with the hub and spoke model smaller short range aircraft were used on quick routes. As airlines decommission old airframes some shorter (or even longer) routes are no longer financially viable.
Geopolitical reasons take hold: Its possible for government actions (generally related to visas and passports) to adversely affect travel and thus make a route either not profitable or completely not viable.
Changing Model: This ties into the airframe issues but over time airlines have changed how they approach travel, both as a company decision as well as a response to technological changes in the industry.
"Can't Land here": Sometimes you just can't get the plane in there
Airport Closures: Airports are by no means everlasting, they do sometimes close down
Bigger, Faster, Farther: There are lots of airports scattered all over the globe that acted as common re-fuel spots during the heyday of the large prop planes and were ultimately not needed during the jet age. While some of them remain as emergency landing spots they dont see nearly the traffic they once did and long distance routes simply bypass them.