Why does Skyrim have ID numbers for skills?

Same concept for anything. Each skill might have a structure tied to it. Structure might contain something like: base damage, skill type, cast time, and so on. But the structure would also contain an ID, something that makes it easy to look up. Most likely you would have an array of these structures. So you essentially assign data clusters (items, skills, perks) an ID so the info is easy to find. An ID could also be an index in the array.