The state database is the purpose of it. Just speed of accessing data. It would be prohibitively expensive without it. So that change from zero to one and one to zero is completely lost in the state database. Which is why we call it the blockchain itself history because there, all the transactions are obviously all still there. They're all still in the chain.
In this introductory episode, we discuss what makes up blocks and block headers. We also cover a bit about state vs history, what exactly makes up a transaction and do a quick intro to a Merkle Tree.
For more, please check out these resources: