Actually, jurisdiction is not solely based on physical location but fundamentally on the power and authority to enforce laws. While geographic boundaries are significant, they are not the only factor determining jurisdiction. Countries often assert extraterritorial jurisdiction, especially when crimes committed abroad have substantial effects within their own territory or involve their nationals.
This is my point, that asserting extraterritorial jurisdiction is up to agreements between countries, and not laws within one country. These agreements are fundamentally political and at the whim of both countries involved. They are not a simple police matter as they would be if the crime took place within one country.