The ‘vicious cycle’ that means the NHS still wastes billions on patients who don’t need to be in hospital