Because it’s easier than doing what you really need to do.
Adding swap might help, but it’s not your biggest issue.