The GetCategoriesCall uses the CategorySiteID to determine which eBay site's categories to return. The site ID in the header is not used for this logic. A code snippet for the Java SDK is shown below:
GetCategoriesCall gcCall = new GetCategoriesCall(apiContext);
gcCall.setCategorySiteID(SiteCodeType.Germany); // SET THE SITE ID HERE
CategoryType[] ebayCategories = gcCall.getCategories();
System.out.println("Category Version: " + gcCall.getReturnedCategoryVersion());
System.out.println("Category Site ID: " + gcCall.getCategorySiteID());