an incomplete list of reasons why sex scenes are good, necessary, and a character study, & rarely gratuitous (from a seasoned smut writer and published author)
body image and dysphoria. does this character voluntarily throw their clothes off, do they have to be coaxed, do they enjoy looking in the mirror, are there any areas they refuse to acknowledge? scars? tattoos? what does this say about their past?
what role do they take in the bedroom, and what relationship does it have to the role they take in day to day life?
social/communication skills. how good are they at eye contact, asking their bedmate what they want, are they about verbal communication or body language? what is their body language, is it open or closed off? are they nervously chatty, are their words short and clipped, are they nervously quiet?
touch starvation. how do they react to touch? when's the last time they were touched intimately? how does this touch remind them of their previous encounters with touch, or is this their first time?
glimpses of their education, sexual and otherwise, and the ways this influences their view of the world. what is their understanding of consent? where did they get it from? what do they think of kink vs vanilla? what is their relationship to both?
self esteem. do they take on a role of service in the bedroom because they want to, or because they feel like they have to in order to be worthy, no matter what they really want? how good are they at expressing these thoughts? do they freeze up when their bedmate asks them what they want? do they even know what they want?
how much attention do they want on themselves vs how much are they comfortable with? would they rather the attention was just on their bedmate?
how much guilt, shame, or repression do they have about sex in general? does it feel like a performance, is it true for them? how do they do with being vulnerable with another person, clothes on or off?
how do they feel about submission/domination, about penetration? do they want marks to be left, or do they insist on no trace left behind?
how do they treat their bedmate? loving, rough, tender, gentle, harsh, sadistic, deferring, no matter the scene/dynamic?
what about aftercare? for themself, for their bedmate? do they do it, do they know what it is, how do they do it? do they value it or do they do it just because you're supposed to?
an incomplete list. might add more. sex scenes add SO much value, insight, and development to a character. they are an incredibly intimate and vulnerable setting, which is how the right writer can show readers so much about who this character is in a bedroom setting. it is not gratutious.