I did not know the sample rate would change the pitch, but I think this is because a program does not know which sample rate the hardware is working with? (I find that a bit foolish - just ask the rate from the Asio driver and conform the sample rate of the program to that....
No - on Hauptwerk's part it isn't simply that Hauptwerk doesn't know what sample rate the VST host is running at (it can very easily determine that).
Playing samples at a sample rate other than that at which they're recorded requires a process called 're-sampling' (interpolation) to be done in real-time. Hauptwerk intentionally doesn't currently do that because doing it with sufficient quality for significant differences in sample rate (e.g. between 44.1 kHz and 48 kHz) is CPU-intensive and would thus reduce performance, as well as still inevitably reducing quality to some extent.
Using the sample rate that matches that of the sample set gives the best performance and quality, which is why Hauptwerk works that way.