I would like to know if all spacecraft that have visited other planets first orbited our own planet and then performed an orbital transfer, or if there have been some that just went directly to the other body. Also, I know that in theory, it's not required to enter orbit first. What are the pros/cons of doing that?

Thank you in advance.