UC’s use only 10-11th grades for their GPA calculation and will only give the extra Honors points for AP/IB or DE courses taken 10-11th grades so it does not matter how a HS weights their classes or if these courses are taken in 9th grade.
There are more than twice as many in-state applicants than OOS applicants so OOS applicants are a self selecting group especially when the UC’s give little to no financial aid. Majority of OOS applicants will not apply to a top school like UCLA/UCB unless they are able to afford the costs and in general be high achieving academically so the OOS GPA’s will be consistently higher.
It is not unheard of for Sophomore/Juniors to take 5-6 AP/IB classes both years along with DE courses (UC transferable) and based on the unweighted UC GPA posted on the Freshman profile, most pretty much have all A’s in these classes and a rare B or 2. OOS applicant admits are also capped at around 20% so UCLA can pick and choose the highest achieving student out of all the applicants that have applied. There are always exceptions to any scenario.