Hopefully this isn't too long a story. First, in WA we classify salmon as either hatchery or wild. (Some wild salmon are progeny of hatchery salmon, and all hatchery salmon were at one time the progeny of wild salmon, but that's not overly relevant to this story.) Because wild salmon propagate in the natural environment where they are exposed to more sources of mortality, a much higher % of the adult population is necessary as spawning escapement to maintain the population. Because hatchery salmon are propagated in the relative security of hatchery environments, a very much smaller % of the adult population is needed as spawners to maintain the population, typically on the order of only 5 to 10% of the adult fish. Depending on the specific wild population, the % needed for spawning escapement ranges from around 30% to 100%, and with certain populations (Stillaguamish Chinook salmon) even 100% of the adults are not enough to maintain the population because of extreme habitat perterbations that have driven productivity excessively low.
So we have this management tool called "harvest rate." The harvest rate is the number and % of a salmon population that can be safely harvested without jeopardizing the size and status of the population. You can see from the above paragraph that some hatchery populations can support harvest rate as high as 95% are acceptable. In the ocean or Puget Sound where hatchery and wild salmon are mixed, a high harvest rate for the hatchery portion of the run will wipe out wild populations. In fact that is how many salmon fisheries in WA used to be managed; high harvest rates sacrificed wild populations to maximize fishing benefits and prevent excessive surpluses at the hatcheries. Then this thing called ESA (Endangered Species Act) came along and said we must maintain and recover wild populations. So harvest rates have been very significantly reduced, with the result that sometimes there are very large surpluses of salmon returning to hatcheries.
You suggest that "they" should just release all the hatchery salmon. Hatchery salmon don't work that way. They are imprinted to return to the water source of their origin, i.e., the hatchery. Hatchery salmon could be trapped, placed in tank truck, and transported to stream locations that could use more salmon, but upon release the hatchery salmon will wander around looking for their natal home, many dying before spawning in this strange place, although some will spawn. The upshot is that as a practice, this isn't cost effective, plus the ESA rules only allow so many hatchery spawners out there spawning in the natural environment.
That's the thumbnail sketch of the story.