The six justices in the majority wrote in their opinion,
"Even if the programs do not include any discussions about abortion, the goals of promoting abstinence and reducing teenage pregnancy could arguably still be undermined when taught by the entity that performs nearly all abortions in Iowa. The State could also be concerned that using abortion providers to deliver sex education programs to teenage students would create relationships between the abortion provider and the students the State does not wish to foster in light of its policy preference for childbirth over abortion. The government has considerable leeway in selecting who will deliver a government message, whether the message is a diversity and inclusion program, a drug prevention program, or, in this case, a sexual education and teen pregnancy prevention program."
The court found that all three stated purposes of the Iowa law passed muster: expressing the state's preference for childbirth over abortion, ensuring state-sponsored sex education isn't delivered by organizations that profit from abortion, and avoiding subsidizing abortion businesses.
The Iowa legislature has recently passed many pro-life bills, including a proposed constitutional amendment that would prevent the constitution from being interpreted to include a right to abortion, as it was in 2018.