Building something is a part of how you reinforce what you've learned from actual material like books, documentation and others research. You still need to know some of the basic building blocks to get started.
It is non answer we give when we have no idea how to answer.
I realize it's probably not the best way to learn, there's the chance of not learning a simpler or better method. But I personally just don't have the attention span to read through books or take online courses.
One big issue with "just do something" is that people are unable to come up with suitable "something". So they don't even start. Building "something" is motivating for some people, but definitely not for all or majority.
Also, people who never coded are pretty much guaranteed to drown in own mess if they attempt to do "something". They will end up with tangled spaghetti they will be unable to make work and they will not know what their issue is.