I feel like it was at the least a nod and acknowledgement of the novels to take THIS PARTICULAR character the novels had built up and promoted and give her this role. Like, there are several characters who could have had the role, or even given it to an original character, and instead, they went the extra mile to not just use Sonya Gomez, but even got her original actress (who seems to mostly focus on her career in journalism these days) to voice her.
I mean, maybe it was just that Sonya was an attempt at building a crew of “lower decks” in to TNG that ended up fizzling out, to show that the ensign who spilled her hot chocolate on Captain Jean-Luc Picard made her way to command, and there’s hope for our band of lower decks crew, but with authors like Kirsten Beyer and David Mack actually working with modern Trek production, even if not Lower Decks specifically, I can see it being at least an Easter egg for novel fans that worked with their overall planned storyline for this episode.