In this context, the license is for using the Arduino Studio application. This is hosted by Arduino, and therefore needs to take user input, save it and work with it. As I understand it, this puts them in a complex situation: they don't own the code you've written (obviously), but they do need to do things with it like compile it and run it (when you press the button in the IDE). They're also hosting the code and therefore partly legally responsible for it.
At the very least, you need some sort of user agreement to specify the things you can do with their content, otherwise you can't really do it because it's their content and you're not allowed to mess with it by default. (Like you said, code is copyrighted by default.) You also need to specify the things that are necessary by law because you are hosting that code and therefore in part responsible for it. You also don't want to make the user sign a new agreement every other week if you add some new feature that they need to agree to use, because the cost of all those legal documents is prohibitive, and it's also very bad UX.
Added to this the fact that lawyers are naturally very conservative as a profession (generally only doing things that have been proven successful, rather than avoiding things that have been proven unsuccessful), and it's easy to see why these sorts of agreements tend to be more expansive than they perhaps need to be, in order to ensure the company is fully protected.
Is this actually true? Doesn't the action of directing someone to compile this code, mean they are allowed to compile this code? Of course they are not allowed to do anything else, but this is what I want as a user. I think it is more, that the vendors want to push the user to grant them more rights than what would be strictly necessary for them to do they job they "sell".
This is what's been explained to me before. The problem is that lawyers don't necessarily work on the basis of "if it seems reasonable that the user allowed this, then this is allowed". Their goal is to make a contract that, if they need to go to court, will make their job as easy as possible. So it's not enough to say "obviously the user pressed the 'compile' button and we needed to do all this stuff to make that happen, here's all my technical experts who agree", instead they would rather say "paragraph 3 subsection 12 clearly allows this behaviour and the user has agreed to it".
It's also, as I understand it, the reason why law has so much of an emphasis on seemingly magic phrases that you copy and repeat in all sorts of different places. These are phrases that have already been tested and have a meaning that has been made clear in a court of law, so if you need to go to court to defend them, you can pull up the existing case law on the subject and rely on that, rather than having to analyse exactly what the new wording means. Hence why these T&C documents tend to have a lot of fairly standard phrases that don't obviously mean what you expect them to mean.
At the very least, you need some sort of user agreement to specify the things you can do with their content, otherwise you can't really do it because it's their content and you're not allowed to mess with it by default. (Like you said, code is copyrighted by default.) You also need to specify the things that are necessary by law because you are hosting that code and therefore in part responsible for it. You also don't want to make the user sign a new agreement every other week if you add some new feature that they need to agree to use, because the cost of all those legal documents is prohibitive, and it's also very bad UX.
Added to this the fact that lawyers are naturally very conservative as a profession (generally only doing things that have been proven successful, rather than avoiding things that have been proven unsuccessful), and it's easy to see why these sorts of agreements tend to be more expansive than they perhaps need to be, in order to ensure the company is fully protected.