I understand how it works but why would we practically use this?
You don't "need" it. But defining it allows your object to be implicitly converted to string, which is convenient.
Having member functions that echo directly is considered poor form because it gives too much control of the output to the class itself. You want to return strings from member functions, and let the caller decide what to do with them: whether to store them in a variable, or echo them out, or whatever. Using the magic function means you don't need the explicit function call to do this.