Why do people stay in relationships they know aren't working?

Hi. I am Ankit from Delhi. I am currently single. Why do people stay in relationships they know aren’t working? I have been observing this lately and wanted to know is it even right to stay in such relationships?