The main purpose of UX in on-page SEO is to create a quality experience for users by ensuring accessibility, seamless navigation, mobile responsiveness, site security, and user-friendly design. It aims to meet user expectations and improve search rankings on SERPs.