It's a job like any other. And it's not outside of SWE, it's part of it; this is a bit like asking how someone moved from SWE to being a backend developer.
My experience was quite a bit different than SWE. For me, it was as part of a R&D group and was more closely assigned to say, signals processing and my coworker was a physicist. The big change was that the skillset was more in rigorous thinking about the model itself and challenging how it worked. I had other parts to wireup the AI/ML that were more SWE for sure, though. What was your experience like?