My textbook says that this function does not have a maximum value because for any $ x $ I choose to be a point of maximum or point of minimum, we can always choose some other $ x $ right next to it such that $ f(x) $ is smaller or greater (as we require). The same reasoning is given in this question here on Math SE.
My question is, why don't we use limits here and say that the maximum value is just 1, and that the minimum value is just 0. In other words, we know that: $$ \lim_{x \to 1^+}\ x = 1 \quad \text{ and } \quad \lim_{x \to 0^-}\ x = 0 $$
In that case, aren't the extremum values technically just 1 and 0? Is there a specific reason why we use limits elsewhere in math but not in this particular case?
The answer is that the definition of maximum and minimum of a set of real numbers $S$ (usually $x \in S$ such that $\forall y \in S: x \ge y$ for maximum) does not contain any limits, so they cannot be used to determined the maximum.
However, there is the definition of supremum and infimum (https://en.wikipedia.org/wiki/Infimum_and_supremum) that gets the answers 'you want'. Both definitions exist, because for some problems the maximum/minimum is important, while for other cases the supremum/infimum.