The US Treasury has less cash on hand than Apple. Apple makes prepayments of a billion dollars for parts. The numbers you're tossing around are, in context, very cheap.
Apple only pays for things that they expect good ROI for. I doubt very highly if they would recoup the money spent to get their phones FAA-certified, let alone the opportunity costs compared to spending that money on something else.