The short answer: It's cheaper, and people seem to tune in anyway, so the return on investment is much larger.
As stated above, they own most of their affiliates, or offer attractive affiliation agreements that make stations a decent amount of money with much less investment in proven products (already successful shows). When they were doing original programming, it was costing more and attracting less viewers, so they carved out another path. Originally, I believe this was just to fill time as they tried to find a buyer or investor for the network (it came very close to bankruptcy, or was bankrupt, more than once).
As for why the CW still airs original programming, this is for two reasons. The first is that their affiliation agreements are much different. They charge more and give less time back to affiliates, in exchange they promise to bring them quality, original, programming. That said, the original affiliate deals have long since expired, so they could have just decided to fold up shop and they stayed in business. The reason is, Warner Brothers and CBS own ALL of the rights to the programs they produce there. While the first runs don't rate that well, even if they lost money they have more than made up for that loss with DVD sales, selling the shows to Netflix, and online viewing. Local affiliates get a chance to promote their syndicated/news fare during original programming (where they keep more or all ad revenue instead of splitting it) and WB/CBS gets a good vehicle to generate original content for eventual (rights) sale to other parties.
What will be interesting to see is what will happen after the next round of affiliation agreements expire. They are contractually obligated to provide a service until then, but now they are owned by AT&T. And AT&T has shown no shyness in ending things that don't make enough money or don't have an attractive deal. I could see them ending The CW because they don't want to share it with CBS, and moving all of their most profitable original programming over to their new streaming service they are looking to launch. This would allow them to concentrate on fewer "brands" and take home even more of the money from these shows. It would also give their "DC Universe" app more exclusive programming, but would take away one way they can promote that.