The credit card industry is growing ever larger, but last week one of its biggest players bucked this trend. Discover Financial Services (NYSE:DFS) announced it was shuttering its mortgage origination unit, Discover Home Loans. It will now offer mortgages through its banking division only.

Because the move represents an about-face for the company, let's take a look at what's likely behind it.

A buy at the top of the market
Discover bought the onetime Home Loan Center division of in June 2012 for around $46 million, but has struggled to make it work since then. In its press release announcing the closure, Discover said the unit "is not projected to meet our financial expectations due to ongoing challenges to our home loans operating model."

Given the timing of the purchase, it seems reasonable to conclude that the unit's failure to measure up to Discover's hopes may have something to do with the state of the market at the time. I say that because 2012 would go on to see over $2 trillion worth of mortgage originations, the highest level since 2007.

To be fair, a lot of that activity was for refinancing -- as is normal in an environment of falling interest rates (after all, home loans are expensive and borrowers want to shave as much as they can from their payments).

But once mortgage rates seemed to bottom out, then climb, total originations began to fall. Following the $2 trillion-plus of 2012, the tally slipped to $1.8 the following year, then plummeted to just over $1.1 trillion in 2014. The latter number, by the way, is the lowest so far this century.

The market is set to improve, but only marginally. The Mortgage Bankers Association is forecasting just under $1.3 trillion for this year, then a dip down to under $1.2 trillion for 2016.

Feeding the Fed
Meanwhile, although mortgage originations aren't a big business in the grand scheme of things for Discover, they do drag on results.

In the fourth quarter of last year, the company booked a roughly $27-million goodwill impairment charge on the mortgage unit. It attributed a "lack of progress" in developing the business to "overall economic conditions as well as an inability to attract customers in the purchase market."

It might have soldiered on a bit longer were it not for a pair of factors. The first is the company's recent financial performance. Revenue has been growing at a decent clip over the past few years, but profitability is stuck in neutral. Cutting a profit-draining division will give bottom line a better chance to grow.

DFS Revenue (TTM) data by YCharts

The second is an agreement it reached last month with the Federal Reserve Bank of Chicago. It pledged to immediately begin enacting comprehensive measures to better comply with the anti-money laundering provisions of the Bank Secrecy Act.

This could very possibly cost it dearly. As my fellow Fool Jay Jenkins writes, lender M&T Bank spent $266 million last year alone on such compliance to satisfy the New York Fed, and it's still laboring to finish the job.

Nobody home
Discover isn't wasting time rolling up the carpet for Home Loans.

It will stop accepting mortgage applications at the end of July, and cease operations entirely one month later. An Atlanta-based specialist, AmeriSave Mortgage, will complete the processing of the applications that remain.

Discover says that it will cut around 460 employees of the mortgage unit. They are to be given severance packages. AmeriSave will apparently offer work to roughly 125 of them.

The impact to Discover's financials shouldn't be severe -- it's expecting to book charges related to the closure of $0.04 per share. Trailing 12-month EPS clocks in at $4.87, meanwhile.

Still, a laggard is a laggard, and just now Discover needs units that grow. The Home Loans division won't be missed.