Agreed it's probably not a smart signing, especially with the opt outs, and it's certainly not a logical position fit, but I think it's just the best of what's out there as far as making the 2025 team as strong as possible.
Boras had a bunch of clients who signed the 1+1(+1) deals last winter, two of them opted out/would have opted out (Snell/Chapman) and three opted in (Bellinger, Montgomery, Hoskins). Alonso is probably a 50/50 opt in for 2026. Teams are smarter now so they won't be fooled by home runs alone. He'll have to have a great season.
Would have to know what the alternative to Alonso. If it's a sensible trade for Robert, then I'd go that route. If it's Austin Hays, then just sign Alonso.