We say an ordered set $S$ has the least upper bound property if every nonempty subset of $S_0$ of $S$ that is bounded above has a least upper bound.
Let $A = (-1,1) \subset \mathbb{R}$. Does $A$ have the least upper bound property? Well, let $A_0$ be any nonempty subset of $A$. If $A_0$ is bounded above, then $\exists a \in A$ such that $\forall x \in A_0, x \le a$. Now clearly, $x \le 1$, but $1 \not\in A$. So how do we we deal with this? We assume (or prove) $\mathbb{R}$ has the least upper bound property. So assuming that it does, then every bounded above subset of $\mathbb{R}$ has a least upper bound in $\mathbb{R}$. Clearly $(-1,1)$ is a bounded above subset of $\mathbb{R}$, since $\forall x \in (-1,1), x \le 1$, so it has a least upper bound in $\mathbb{R}$, but not in $A$?
Similarly, why doesn't $(-1,0)\cup(0,1)$ have the least upper bound property?