Course codes used to be managed centrally, so the same course would get the same code, even if it was being offered by different unis.
Then the process was changed so that unis got to allocate the course codes themselves. Most just stuck with the codes they'd always used, so not much changed.
However some unis (e.g. Bath) have started to allocate their own codes now, so things are starting to diverge. The course code doesn't mean anything, other than as a means of identifying the course to the university concerned.