Absolutely agree. You need to meet HS diploma requirements first, as well the entry requirements, for admission to the universities, by taking the core courses.
The UC’s and other universities like to see that you have taken the most rigorous academic prerequisites. Taking electives is fun, but it shouldn’t be at the expense of your core classes. Without the core classes, you risk not being admitted to your universities.