You've worked with juniors before?
Because in my experience I was constantly reading their unreadable code, then telling them why it's wrong or bad or not fitting in a digestible manner and then waiting weeks for a refactor.
Iterate that for a month. Mentoring them took way longer than it would have taken me to write it from scratch. Not that dissimilar to trying to using AI for where it sucks (larger, a tad more complex problems).
It only makes sense if you look at it as an investment, because they will eventually improve.