In my notes there are numerous equivalent conditions for a family of subsets $A$ of a set $X$ to be an algebra
In particular why is $X \in A$ and $ S \cup T , S \cap T \in A$ for every $S,T \in A$ not enough to guarantee $A$ being an algebra of subsets.
A simple example of non-algebra $(X,A)$ satisfying the required conditions is $X=\{0,1\}$ and $A=\{\{0\},\{0,1\}\}$.