A lot of my head canon around this and the notable lack of automation prevalent in Starfleet: it’s a futuristic, post-scarcity jobs program. Yes, it’s about exploration and rendering assistance and all that. But it gives people something to do, a way to serve the whole. Picard said as much to Geordi when Scotty was aboard. I’ve of the many things Starfleet does is give people a sense of usefulness.
Almost, but quite to point of human “jobs” in The Culture books, where benevolent AIs actually run everything. Humans are considered by the AIs as pets.