Also, you're more likely to get a smaller lecture for Calculus and maybe some of the Physics or Chemistry at a junior college because they're higher level courses there. At a university, those are lower level courses and may be in giant lecture halls, which is not great for Calculus anyway. For science, lab sections are usually small because you can't fit that many students in a lab, so you get some smaller class size stuff there at least.
But certainly, not all community colleges are alike. If you want to transfer to a bachelor's program, you want to find a community college with a competent transfer program that is hopefully aligned with your destination and at least has a track record of transfering students who go on to get their bachelors. Some community colleges aren't great at that.
Also, California community colleges are very affordable, but some states don't have that. If community college has costs in line with 4 year schools, then it might not be a great choice.