Example of WordPress default CSS class output:
<li id="menu-item-55" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-55">
<li class="page_item page-item-37">
The menu and pages list item come with various own li class and id.
How to remove them in functions.php file for the menu and for the pages list?
You should be able to remove them by hooking into a couple of filters and returning empty arrays or strings rather than new classes or ids:
If you wanted to keep particular classes you could do something like this: