XP should be for accomplishing things the game wants me to accomplish, whether killing monsters, overcoming obstacles, finding locations, hauling treasure back to town, just making successful checks, some sort of downtime training activity, or reaching some sort of milestone. The key thing to me is that it should be awarded for more than one thing. Any mono-focused system is going to encourage excessive focus on one type of activity (although absurd, illogical within universe PC monomania for one activity can make the game fun in its own ridiculous way, I just don't dig that long term or think of it as good design).
Which is why I'm not a big fan of pure milestone leveling. It has a high potential to penalize getting off the railroad and doing anything unintended, or sometimes even just completing all the intended sidequests. That's not to say it can't be done well by a DM actually picking appropriate milestones for their groups activities, I just think in pre-written adventures it has become a crutch for lazy design, and woe betide you if you have a DM rigorously following one of said pre-written adventures.