The recent scandal involving Amazon CEO Jeff Bezos lead Sam Louie MA, LMHC to go into detail about the reasons for sexting. For example, one recent study suggests that for men (almost 50%) the top reason is it satisfies their sexual needs or feels good. While for women (almost 20%) the top reason is insecurity.
For information and sources:
https://www.psychologytoday.com/us/blog/minority-report/201902/why-smart-people-sext