The company spent over $40 billion trying to build a 5G network before selling the spectrum needed for that effort.