How come when you mix water and flour together you get glue...and then you add eggs and sugar and you get cake? Where does the glue go?

How come when you mix water and flour together you get glue...and then you add eggs and sugar and you get cake? Where does the glue go?