What is the purpose of the local non-satiation assumption in the first welfare theorem? The profit maximization assumption implies 
$$\text{if } x_i \succ x_i^* \text{ then } p_ix_i &gt; p_i w_i$$

Okay so this just says if the agent is utility maximizing / rational, then if he doesn't choose a bundle strictly preferable to his bundle then it must not be affordable. 

Why is the local non-satiation assumption needed to then say 

$$\text{if } x_i \succeq x_i^* \text{ then } p_ix_i \geq p_i w_i$$

Why isn't this just automatic from the profit maximization assumption? If we know $x_i \succ x_i^* \implies p_ix_i &gt; p_i w_i$, isn't it obvious that $x_i = x_i^*  \implies p_ix_i =  p_i w_i$ and so $$\text{if } x_i \succeq x_i^* \text{ then } p_ix_i \geq p_i w_i$$
The assumptions are different. First one states that if a bundle is better than the optimal one the consumer cannot afford it. The second one states that if a bundle is as good (not necessarily better) than the optimal one it has to cost as least as much, not less.

Consider a space with just one type of good, $x$, and a utility function $U(x) = 0$. Let the endowment of the consumer be $w = 1$. While
$$
\text{if } x_i \succ x_i^* \text{ then } p_ix_i &gt; p_i w_i
$$
is still true,
$$
\text{if } x_i \succeq x_i^* \text{ then } p_ix_i \geq p_i w_i
$$
isn't, because $x^* = 0$ is both optimal and feasible, thus
$$
x^* \succeq x^* \text{ AND } p x^* &lt; p w.
$$
More complicated examples (multiple goods, global non-satiation fulfilled) may also be constructed.