Apart from aesthetics, themes are responsible for two important things. The first is accessibility. For example, a site should be compatible with screen reader software, so students with vision impairments can take the class. Also, someone with motor impairments may not be able to use a mouse. The site should be usable with just a keyboard.
You can try site accessibility yourself, right now. At the top of your browser is the URL bar, with something like "skilling.us/accessible-and-mobile" in it. Click there. Now pretend you can't use a mouse. Use the tab key to move around the page.
Seriously, give it a go. I'll wait...
See how the blue outline jumps from item to item? In geek terms, the outlined item "has the focus." Pressing Enter is like clicking on the item that has the focus.
There's also a "Skip to main content" link that appeared and disappeared. Screen reading software uses skip links to help unsighted students jump to the meat of a page, bypassing menu links, sidebars, and other things.
There's more to accessibility, of course. It's quite complicated, if you try to do it right.