Let's consider a Conductor (ideal) connected between two points having potential difference V.
So, Energy dissipated by the conductor when Q Charge passes through the ideal conductor connected between a potential difference of V Volt must be equal to the Energy supplied by the battery to the conductor which is equal to QV.
(NOTE: In case of Resistance also, the same amount of energy is dissipated. The only difference is that in a Resistance the dissipated energy appears as heat but in this case of an ideal conductor, it appears in some other form (maybe as a spark or Electromagnetic radiation, which I'm not sure)
Now let's consider the case of Charging of a Capacitor through ideal Conductor. :
Now did you figure out where Energy must be dissipated????
Yess !!! Exactly.. (VC-VB) is a non-zero quantity and hence Potential difference exists across the ideal conductor connected between the points C and B.
Using above discussion :
[ Note : The model above is an oversimplification of everything. For example, why only the right wire dissipates energy? Actually, energy is dissipated throughout the ideal conductor in form of sparks or Electromagnetic radiations. But if you need to know why energy is dissipated, it turns out that it's not required to have a knowledge of exactly how energy is dissipated. I only tried to point out that. Ignore this answer totally if you are interested in knowing how ]