You say "approximate X" when X is the thing that you are approximating. You say "approximate X to Y" when Y is the degree or "destination" of the approximation.
To take a simple example, you might say, "We will approximate the radius of the circle." That is, we won't get a very precise measure of the radius of the circle: we will just get a rough number.
"We will approximate the size of the circle to the nearest the radius of the circle to the nearest inch." We won't get measurements more precise than an integer number of integers. Similarly, "We will approximate the radius to 3 decimal places."
By "destination", I mean that you are using one thing as an approximation of another. For example, you might say, "We will approximate the ellipse to a circle".
We don't always specify X if it's already been identified or is obvious from context. So someone might say, "We will approximate to three decimal places." What are we approximating? Hopefully that is clear from the context.
In your first example, the surface area is not a spheroid. He is approximating to a spheroid. Note that it is not the spheroid that is being approximated, but the surface area.
In your second example, something is being approximated to a dessert. In context, it's clear that the thing that is being approximated is an item of food. This statement is not intended literally. He's saying that none of the food items in question actually IS a dessert, and only one even approximated to being a dessert. Presumably whoever prepared the food would say that of course it is a dessert. The statement here is intended to be an insult. It's not even a bad dessert, it doesn't qualify as a dessert at all.
You would not say that your "analysis will approximate to the actual program semantics", just "analysis will approximate the actual program semantics". The thing being approximated is the semantics. There is not something else that is being compared to the semantics. With the "to", it would sound like you are saying that the analysis is being compared to the semantics, which doesn't make sense to me.