It probably depends a lot on the specifics of the situation. For my PhD, the funding was secure up front. This is not unusual in Europe, but I hear the USA is sometimes different. I was given a lot of freedom, and ended up spending a lot of time on creating generally usable software artifacts (specifically: I do PL and compilers research, and I documented and made available the implementation of my compiler).
It probably depends on the field, also on the supervisor, and how much clout or willpower the student employs to force through their own vision. I made it very clear during my PhD that I was in principle paying a significant sum to be a PhD student (comparing my PhD salary to what I could go and earn in industry), so my tolerance for constraints was low.
It probably depends on the field, also on the supervisor, and how much clout or willpower the student employs to force through their own vision. I made it very clear during my PhD that I was in principle paying a significant sum to be a PhD student (comparing my PhD salary to what I could go and earn in industry), so my tolerance for constraints was low.