How does a mixture not retain its chemical identity? My book says that matter can be classified as an element, compound, or mixture. It further says that a pure substance (or substance) is matter that has distinct properties and a composition that doesn't very from sample to sample. So far, so good. Then it says that


  all substances are either elements or compounds


An element is one type of atom (something that "cannot be decomposed into simpler substances") and a compound is composed of two or more elements; these both clearly are substances. Then, it says that 


  Mixtures are combinations of two or more substances in which each substance retains its chemical identity.


This is where I'm confused. How are mixtures not substances? They have distinct properties, and their composition doesn't vary from sample to sample, if you set a standard for the sample. You can create any arbitrary mixture, and you can create any arbitrary compound, and if you follow the "recipe" for either you will always get the same thing, as far as I know.

Where is my logic flawed?
A good example of the difference might be to look at water, $\ce{H2}$, and $\ce{O2}$. 

If you have gaseous $\ce{H2}$, and $\ce{O2}$ in a container you have a mixture; you can change it to have $99\%$ oxygen and $1\%$ hydrogen or vice versa or any ratio in between, but it is still a mixture of the two gases. These mixtures will have different properties depending on the ratio of the two gases. Each gas still has its own properties and the mixture exhibits some combination of them depending on the ratio.

If they are allowed to react to form water, now we have a substance. Regardless of how we make water, it will always have the same composition (two hydrogens for each oxygen) and the same properties. Importantly, these properties are completely different from hydrogen, oxygen, or any mixture of the two.