A capacitor charges to the battery's EMF even with a resistor in series because, in steady state, the voltage across the capacitor equals the battery voltage while the current becomes zero. Although energy is dissipated as heat in the resistor during charging, this does not prevent the capacitor from reaching the same potential difference as the battery. The charging process follows an exponential decay curve, where the current decreases over time, but the capacitor approaches full charge asymptotically. In practical scenarios, a small leakage current may flow, resulting in slight energy loss, but the voltage across the capacitor ultimately matches the battery voltage. Understanding the distinction between voltage and energy is crucial in grasping these concepts in circuit theory.