For a number of reasons, no, we don't want PhD students to research whatever random topics pop into their head.
For a start, PhD students don't know how to do research. That's one reason one does a PhD: to learn how to do research. That means listening to your supervisor and working on problems they suggest, at least in the early part of your PhD. I have seen many PhD students, including myself, arrive with half-baked ideas that go nowhere. Learning to formulate a useful research problem is a part of what you are taught.
The second reason is that resources are finite. You don't get to piss around with other people's money anymore than other adults do.