Why was the sewing machine invented during the industrial revolution?

It was made to make cloth and /or clothes for the people who needed it and used it to help around.