It is how PHP handles objects. Essentially, $wp_query is an object that has methods (functions) and attributes that can be accessed through the -> characters.
PHP didn't start with objects so you see it now as sort of an afterthought. I find -> to be a messy way to handle it, compared to say Ruby, which was built with objects from the foundation.
You can find more at: http://php.net/manual/en/language.oop5.php