Each college could have its own rules on whether and how it recalculates your GPA, including differences in how it treats repeated courses.
For example, among California public universities, CSU uses only the highest grade from any attempt of a repeated course, but UC uses the first C or higher grade earned: https://admission.universityofcalifornia.edu/counselors/_files/documents/csu-uc-a-g-comparison-matrix.pdf