1. Because the thumbnail function grabs the info for that specific photo and the text link to ad uses the already available information.
2. The showproduct script can use other cat variables to setup specific next prev image calls as one example. As stated most url's in the program as passed through the construct_ppurl function in pp-inc.php and thus any variables that exist depending where you click will be passed. In some situations they exist and some situations they do not. We do not hard code every url in the program they are instead dynamically generated.