"Military customers are pretty loyal and they pay their bills on time," said Michael Ott, president of U.S. Bank's wealth-management division and a colonel in the Air Force Reserve. "We see less churn than with customers who never served."
Banks are also betting that if they can attract veterans and service members when they're young, they will grow with the bank and eventually trade up from a checking account to more extensive services, like mortgages and commercial lines of credit. More services, the thinking goes, translate into more fees for banks.
"We're trying to build customers for life," said Natalie Abatemarco, managing director for national initiatives at Citi Community Development.
The large banks are imitating a model set up decades ago by USAA. The company was founded as the United Services Automobile Association in 1922 in San Antonio by Army officers to insure one another's cars. It eventually grew over the years to include banking services, mortgages and financial investments.
Read MoreBanks: Rules to make short selling more expensive
With more than 10 million members, up 7 percent from 2012, USAA is now one of the country's largest direct banks, meaning it does not have traditional branches and provides services on the phone or online. Deposits climbed 6 percent, to $59.2 billion, in the first quarter of 2014 compared with those in the period a year earlier, according to the Federal Deposit Insurance Corporation. Because of its lack of branches, fees are low or nonexistent.
But the company is not immune to the overall struggles in the financial sector. While revenue as a whole climbed 1.2 percent in 2013, to $21 billion, USAA's net income declined by 3.8 percent, to $2.7 billion.
Still, USAA is growing, a development that can be attributed to the rise in popularity of direct banks, a foray into advertising, relationships with military organizations that raise the bank's profile and a loosening in membership requirements. Only active-duty service members could largely join before 2009, but now all veterans with honorable discharges can open accounts and pass their eligibility to their spouses, children, parents and grandparents.
The company's wide array of services tailored specifically for military personnel, like predeployment and retirement financial counseling by those who have recently done the same, have helped it retain the majority of its customers. USAA says it keeps 98 percent of them. USAA has also been ahead of many banks with technological innovations, like mobile check deposit, video chats and low-bandwidth sites that make it easy for widespread military personnel to do their banking.
"They've been at the forefront and they've had to be with the increasing deployments and no on-base presence," said Andrew M. Egeland Jr., a retired Air Force major general who is chief executive and president of the Association of Military Banks of America in Warrenton, Va. "I consider them to be an industry leader who everyone is chasing."
The military banking sector received scant attention until the terrorist attacks of 9/11 and their aftermath, when thousands of members of the reserves and National Guard were activated and sent abroad to fight. The military's profile was heightened drastically and banks realized they were missing an important demographic. Legal action also pushed many of the country's biggest financial institutions to address the military sector.
Some of the country's biggest financial institutions illegally overcharged thousands of service members interest on their mortgage payments and foreclosed on more than 700 of them while they were deployed, a violation of the Servicemembers Civil Relief Act. JPMorgan alone overcharged more than 6,000 service members. In settlements with the Justice Department, banks agreed to pay millions of dollars in fees and payments as restitution.
"When the examiners focus on something, the bankers focus on it, too," said Robert Rowe, vice president and senior counsel at the American Bankers Association who also oversees the association's military programs.