As others have stated, the reasons why there's a ところ in ところが and ところで are entirely historical. It probably had a more literal meaning in the past, but now its became part of a frozen expression, where the lexical value (the meaning) is assigned to the entire expression, and its parts don't matter much anymore. The situation here is really no different than "by the way" which Dave gave out as an example.
But if you do want to delve into the historical explanation (and I guess you do), it's probably something along these lines: ところ has already gotten a generic meaning by the time of the earliest written Japanese, and when it was used with a particle, these meanings combined into something new.
Now I'll try to give more specific details for each expression. Note that everything here is my theorizing, mostly based on what I've found in my Kokugo dictionaries (especially Kōjien, which lists the senses for each entry in their historical order, and attempts to provide the earliest examples for each sense).
ところが
This is one seems easier to explain on the surface level: it's just ところ in its generic meaning, referring to what was previously said, and then we have the conjunctive particle が, which may be used in the meaning of the English "but". There truth is probably quite more complex, however.
It seems like ~ところが was originally used only after full clauses, especially verbs conjugated in the past form (~したところが). The meaning of が here was not only contrastive ("but") - it could equally be used as a connective ("and"), just like が is used today in both capacity. This whole expression translated more or less to: "did ~ and" or "did ~ but". The more literal meaning was something like "this is the point that X was done. And/but then ...". But this is quite a cumbersome translation of a very faint shade of meaning that eventually faded away. :)
ところで
Since ところ with a verb in the past tense already has the grammatical meaning of "the point when the action is completed", ところで may have been used first in the meaning of "with that having been done, ...", and Kōjien indeed list this usage. Eventually, this usage was specialized to mean "with that having been said, let's move to something else".