If someone is just starting into software industry as a fresh graduate then why not to get into AI/ML instead of software development?
I'm a bit confused by this question: AI/ML is a large domain, and a big chunk of it is software development. There are a lot of MLEs who write a bunch of code. I worked with a bunch of them back at Meta (I was on ads and ML is super important there for ranking).
Also, you literally can't just become an MLE right off the bat in the majority of cases as a new-grad (it's really tough with just a Bachelor's and even with a Master's, it will be tough). Everyone wants to get into AI/ML right now (bandwagons are powerful), but there aren't enough positions for it. This allows companies to be picky and only select:
I also recommend going through the following thread and its related resources (it has input from some great MLEs, including one at Google): "Is it worth transitioning to become a Machine Learning Engineer?"
Zooming out, quality of company/team/manager coupled with pursuing genuine passion is far more important than the domain you're in. There's no such thing as a domain that's inherently superior to others. If you're in the Top 1% of your field, it doesn't matter if you're back-end, Android, Big Data, or web - Companies will throw fistfuls of cash at you. I share a lot more thoughts in-depth here: "The AI frenzy is really making me rethink my career - What direction should I take?"
I don't think there's a hard line between these job functions. Every software engineer will increasingly use more AI tools (and even customize AI tools as needed).