When Washington scrambled to rescue small businesses knocked down by the coronavirus crisis, there was no confusion about who was supposed to get a piece of the $349 billion from the new Paycheck Protection Program.

“The PPP was intended to help small businesses that often don’t participate in SBA loan programs — the family-run restaurants, the small stores, mom-and-pop businesses,” Rep. Gerry Connolly, D-Va., told NBC News, referring to the Small Business Administration. “They’re in dire shape. They are the priority and should be our primary focus for relief.”

But the program wasn’t actually written by Congress and the Department of the Treasury to exclude certain bigger businesses in need or smaller firms in good standing that found themselves eligible for the low interest loans, which convert to grants if recipients keep their payroll on staff. Many of the intended recipients weren’t able to access the first tranche of funds, even as stronger competitors got loans, and the account was emptied in a matter of days.

Now, Washington is doing two things at the same time: pointing fingers at companies that maximized their opportunity under the rules and pumping another $300 billion into the program to serve more applicants. The Trump administration issued guidance Friday designed to dissuade private equity and hedge funds from applying for loans, but it remains to be seen how that will work.

It is a classic example of Washington not understanding how Main Street and Wall Street think about risk and opportunity — or the scope of need.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

For banks, which were drafted into the position of making the loans, it made sense to give first to the most creditworthy applicants. They were understandably reluctant to lend federal money to borrowers who might not be able to pay it back or accept the potential for liability in cases of fraud. That gave a leg up to businesses, regardless of size, that had borrowed from the bank before and paid their debts or those that weren’t likely to go bankrupt because of the coronavirus crisis.

Company filings released by the Securities and Exchange Commission show that in addition to relatively modest loans for those mom-and-pop shops, banks gave to arms of household-name corporations that qualified because of their structure and small investment management firms with little reason to think that an economic crisis would lead to laying off employees.

For companies in good standing, it’s hard to turn away cash. The government will forgive any portion of the loans, which range up to $10 million apiece, for businesses that keep at least 90 percent of their workforce on payroll. And the interest rate for portions of loans that aren’t forgiven is 1 percent.

PPP is “leaky as hell,” said Gary Gensler, a former Commodity Futures Trading Commission chairman who also worked at the Treasury Department and Goldman Sachs.“Businesses are going to pursue, the most that they can, what is a forgivable loan — what is largely free or cheap money,” he said. “And if you’re an investment manager or a restaurant chain, yes, you’re going to do that.”

Moreover, he said the program’s biggest design flaws include a yawning gap between the large number of small businesses — roughly 30 million in the country — and an amount of total funding that can’t come close to serving them all, as well as criteria that crowded out small businesses based on their sector of the economy or their inability to precisely meet requirements for spending on payroll vs. other overhead costs.

Download the NBC News app for full coverage of the coronavirus outbreak

If every small business divided the $649 billion pot evenly, each would get roughly $21,600 — or enough to pay six employees Michigan’s minimum wage for two months. As a result, many of them have shut down already or will be forced to close soon.

As the next round of funding becomes available, the program has been altered to give community banks a better shot at claiming a portion of the origination fees totaling billions of dollars and farms with fewer than 500 employees an opportunity to receive money.

But Congress has done little to ensure the neediest are at the front of the line or that there will be enough money to go around. The Small Business Administration, working in conjunction with the Treasury Department, issued guidance Friday that the leaders of the agencies do not "believe that Congress intended" for private equity and hedge funds to be eligible for loans. The guidance also included a "safe harbor" provision to encourage businesses that are in strong standing to return loans if they are not needed.

It seems likely that will create an incentive for those categories of borrowers to refrain from applying, and perhaps for some banks to deny such applicants, but Congress just changed the law and chose not to exclude them.

So it's not entirely clear yet what effect the rule will have on lenders and borrowers.

What is clear is that even this latest round of funding suggests Washington would rather complain about the flaws than fix its work.