The purpose of a transfer bench is to assist individuals with mobility issues or those recovering from surgery to safely transfer in and out of a bathtub or shower, providing stability and support during the process.