It's to do with Medieval Latin. You can also understand it if you speak any Italian.
In Medieval Latin pronunciation, -ci- and -ce-, which were pronounced /ki/ and /ke/ in Classical Latin, were pronounced /tsi/ and /tse/. Modern Italian does something similar, where -ci- and -ce- are pronounced as /tʃi/ and /tʃe/ (chi and che), as seen in, say, cucina (kutʃina). Anyway, one common way to express a /ts/ sound, particularly in the Medieval and Early Modern periods, was to use z (zeta), which was pronounced as tseta in premodern greek. German still retains this sound: z is pronounced ts in German, as in Zimmer (tsimmer), Zoll (tsoll, and Zunge (tsunguh).
So uncia in Medieval Latin would have been pronounced ontsia, and spelled onzia. onzia, of course because u -> o in Postvulgar Latin (cf., e.g. (Lat.) vinum->vinu-> (Sp.) vino. You can also see the ce->z(e) in Spanish with, e.g. lux (luce) -> luz; *narix (narice(m)) -> nariz; iudex (iudice) -> juez; uncia -> onza.
This is also the reason why videlicet ("namely", "that is to say") abbreviates to viz.