With PHP, you can't do things on your computer like displaying a Popup or Dialog, while on the other side with JavaScript you can't do things on the server like querying the database.
why does Vbulletin use Javascript? does it do stuff that PHP could not do?
Yes, as Javascript is not server side, it allows for some execution even after the page is done loading, which php does not allow. Examples for these are the options to check all checkboxes.