The concept of a Repository was introduced with the .NET implementation of Tridion (so 5.3 I should think). .NET allowed for a class hierarchy, as opposed to the strictly interface-based approach of COM. Until then, and indeed, until now, the only kind of Repository in Tridion is a Publication.
The Context Repository of an item is a BluePrinting concept. It's the repository in which you have accessed the item. So if I open an item called tcm:5-1234, its context repository will be 5. If it's not really there, and only a shared item that lives in a different place in the blueprint, it's Owning Repository could be different. So if my component is shared from publication 3, its Owning repository would be 3.
So as things stand now, the Context Repository of an item will always be its Publication. If there were ever to be another kind of repository, then presumably items in it wouldn't have a Publication, while the Context Repository would be expected to be available. (An item has to live somewhere, right? Obviously, System items live in their own special place.)
So if you're writing code that deals with publications specifically, you might use Publication.Id. In general, though, most often when you need to know what the repository/publication is, you are doing something with BluePrinting. Although we often talk of Publications when dealing with BluePrinting, it's actually Repositories that do BluePrinting; Publications just inherit this behaviour, so for BluePrinting work, use the Repository.