You don’t even have to use them to style the elements. As long as the correct elements with the correct ids are styled according to any CSS requirements you can use class, element type, etc. selectors.
Just to be clear. It’s not one id per page. It’s that an id must be unique within the document/page.
There can be multiple id’s as long as they don’t have the same value.