Use of classes instead of ID in HTML
i was wondering why people keep using classes instead of id for every single element in the page. i mean, even the classes that are used for one single element(one time) are classes and not ids. it seems to kind of contradict the purpose of id and class. like pages have sections that have classes named that section topic, even though each section is unique and only once in the document(and therefore so is the classname for it). also, what if they need the id later? imagine that they are creating "table of contents" bar at top of page where they create anchor tags to go to each section. what then? they can't link the sections since they used classes everywhere, not id. are they going to now manually add id to every section and elements they want to create anchor links to? and if that IS the case, what are they gonna name it? the same as the class names?