Let $(\Omega, \mathfrak{A},\Bbb{P})$ be a probability space with $\mathfrak{B}\subset \mathfrak{A}$ a sub-$\sigma$-algebra. Let $X\in L^1(\Omega, \mathfrak{A},\Bbb{P})$ be a random variable. Then there exists a unique random variable $\xi$ which is $\mathfrak{B}$-measurable such that for all random variables $Z$ which are also $\mathfrak{B}$-measurable and bounded we have $$\Bbb{E}(XZ)=\Bbb{E}(\xi Z)$$ We call this $\xi$ the conditional expectation of $X$ given $\mathfrak{B}$ and denote it by $$\xi=\Bbb{E}(X|\mathfrak{B})$$
This is our definition of the conditional expectation I have read in a book. I know that there are equivalent characterizations. But now I asked myself why do I need $\mathfrak{B}$? Why can't I only work with $\mathfrak{A}$? I have also read about conditional expectation viewed as a projection, does this help to understand why we need to work with $\mathfrak{B}$ instead of $\mathfrak{A}$?
It would be nice if someone could explain this to me.
Thanks for your help.