If you just want to learn about the theoretical side of things or if your discipline is purely theoretical (maths, etc.), then sure: You can learn from books and online materials, though chances are good it will go wrong in some way.
For instance in a field like maths it can be important to have someone correct you if you got some fundamentals wrong and it is hard to learn how to formulate a proper proof without someone checking and correcting your first attempts. It can be done, it might just take you a lot longer.
Other areas however require labs and expensive equipment for the practical applications. Some skills you can't learn from books alone.
That would be (almost) like saying: You don't need an actual bicycle to learn riding one, just read a book!
For instance in a field like maths it can be important to have someone correct you if you got some fundamentals wrong and it is hard to learn how to formulate a proper proof without someone checking and correcting your first attempts. It can be done, it might just take you a lot longer.
Other areas however require labs and expensive equipment for the practical applications. Some skills you can't learn from books alone.
That would be (almost) like saying: You don't need an actual bicycle to learn riding one, just read a book!