Origin of high-energy charge excitations observed by resonant inelastic X-ray scattering in cuprate superconductors