No, they probably didn't earn billions from that code. Their biggest cash cows were feature phones (non-Symbian) that sold 10-50 times as many as Symbian phones and were developed with many times smaller budgets. While some Symbian phones were pretty good for their area, there were probably at least as many failed projects as successful ones.