I don't know for sure, but I'd guess performance reasons.
It would take an additional read from the drive to get the titleid, but using the path that is already in memory, we have a reasonably unique identifier for the cache id
What API does dolphin use?
Dolphin uses a lot of APIs, which one would you like to know? :p
If you're talking about the GUI, that's wxWidgets. If you talking about MD5 hashing, that's provided by PolarSSL, iirc. Dolphin has its own wrappers for file I/O, but if you're hacking something quick and dirty yourself, I'd just use C++ and fstream directly.
Just the GUI for now. I've been wanting to expand my limited c and it's about time I start learning how to program complex things like emulators. I'm sick of wondering how games are made, how they use graphics cards, that sort of stuff. Granted Dolphin isn't a game and is what tacticians call, freaking huge and terribly complex. I think it would be a good learning experience if I started looking at things like this. I'm getting tired of being tied to .NET and being helpless when I see open source projects I know I would be interested in. For the immediate now, I'll start porting my .Net apps to c/cpp for experience. It'll be a while. I want to do it right. No dirty code.