If your experience is limited to academic projects, grinding leetcode, even competitive programming, you've done things where first one is nearly always optimal.
Once you are on a team optimizing for continued feature delivery over time, the cognitive load of picking up and understanding old code full of raw maps and strings starts to justify the overhead of a bit more semantic scaffolding in places.
IMO the necessary judgment has to be learned even by smart, academically talented people.