Largely because social care / care at home is run by private companies trying to squeeze as much as they can out of the money they receive from local authorities, which means wages stay low and attraction / retention of workers is incredibly hard.
No carers, no patients in beds, so they have to stay in hospital which has the knock on effect of no one moving to beds within the hospitals and backlogs at A&E etc....
Sort out social care and many issues in the NHS get resolved....