For example the waiting time target in a hospital can be met if enough patients are killed off quickly so freeing up beds. However hitting the waiting time target in that way is rather missing the point of healthcare!
I think one word which describes this kind of thinking is shortsighted:
lacking foresight or scope; a short view of the problem; "shortsighted policies"; "shortsighted critics derided the plan"; "myopic thinking"
In Calif. panel rejects new offshore oil drilling (2009), the situation is described in which the State Lands Commission rejected a proposal that could have led to the first new oil-drilling project off the California coast in 40 years.
...supporters...[said drilling] would benefit the region and help the cash-strapped state. Opponents, however, argued the plan was shortsighted. The vote came the day after the 40th anniversary of a massive oil spill off Santa Barbara that coated miles of beaches with oil and killed dolphins, seals and thousands of birds. The spill helped lead to the Clean Water Act and a moratorium on offshore drilling, galvanizing the modern environmental movement.
Unforesightful is a less elegant word for the same phenomenon.
Similarly, myopic, though technically a visual defect in which distant objects appear blurred, can be
lack of discernment or long-range perspective in thinking or planning
These are single words. A common idiom, though, is can't see the forest for the trees.
Not a single word but there is a phrase related:
(figuratively) The solution or proposed solution to a problem produces a worse net result than the problem does (or threatens a non-negligible risk of doing so), especially via unintended consequences.
Unintended consequences can be roughly grouped into three types:
- A positive, unexpected benefit (usually referred to as luck, serendipity or a windfall).
- A negative, unexpected detriment occurring in addition to the desired effect of the policy
(e.g., while irrigation schemes provide people with water for agriculture, they can increase waterborne diseases that have devastating health effects, such as schistosomiasis).
- A perverse effect contrary to what was originally intended (when an intended solution makes a problem worse)
Also, this phrase is related to your example:
Throw out the baby with the bath water is an idiomatic expression and a concept used to suggest an avoidable error in which something good is eliminated when trying to get rid of something bad, or in other words, rejecting the essential along with the inessential.
A slightly different explanation suggests that this flexible catchphrase has to do with discarding the essential while retaining the superfluous because of excessive zeal. In other words, the idiom is applicable not only when throwing out the baby with the bath water, but also when someone might throw out the baby and keep the bath water.
"Gaming the system" reflects the idea that a nominal optimization of the system is not the one desired by those who set up the system. It adds the connotation that the one doing the gaming is doing so for their own benefit, perhaps because it's easier than succeeding legitimately.
It sounds like a solution like Procrustes used to do with his bed. In Greek myth he would take travellers and fit them on his bed. If they were too long, he would hack off their head and feet. If too short, he would use the torture rack to stretch them to fit.
So, a Procrustean Solution fits the example, but sadly classical education isn't widespread enough that most will understand the reference.
For trying to focus too much on solving small details without paying attention to the bigger picture, there's "not seeing the forest for the trees". Though this only applies in cases where the details are being focused on, but the larger picture ignored.
Another military phrase that I also hear in sports. Won the battle but lost the war.
The Cobra effect
occurs when an attempted solution to a problem actually makes the problem worse
The name comes from an anecdotal tale of a government attempting to reduce cobra numbers by offering a bounty for dead cobras; the net effect was an increase in cobra numbers, as enterprising folk became cobra breeders in order to gain more bounty.
The question you're asking relates to a business process: managing a constrained resource (i.e. hospital beds). The moral aspect of killing people aside, in the world of process science and business this type of "solution" is known as a local optimization.
People that don't have a global picture of how an entire system or process work often times make the best decision for an single part, but this might not be the best decision overall. Someone has to have a view of the entire process or system to make global optimizations. Approaching problems from this aspect is often referred to as systems thinking.