Having woken up and not eaten for well over 8 hours, the amino acid pool in your body (the available constituents of proteins) will be greatly diminished. There are two primary ways to replenish your amino acid pool:
1. Break down muscle tissue (as muscle has an abundance of proteins that can be utilised by the body)
2. Consume protein in your diet
Because you ideally wish to avoid breaking down muscle tissue (this will affect your tone, your ability to breakdown fat tissue, strength, fitness etc.), the optimal approach is to consume some fast absorbing protein as soon as you awake in order to replenish this amino acid pool.
When you exercise, you are breaking down plenty of calories and putting a lot of physical stress on your body. Consequently, your body has a heightened requirement for amino acids (derived from proteins) in order to repair itself from this stress. If you were not to consume a protein shake prior to your workout, this would mean that a significantly greater degree of muscle tissue would be broken down.
Now in regards to the consumption of a protein shake prior to your workout versus after your workout, it takes approximately 60-90 minutes for the proteins to be consumed, broken down into amino acids and absorbed into the blood stream. By consuming a protein shake prior to your workout, by the time your workout has completed, the amino acids will be there and ready to repair muscle tissue. If you were to consume it after your workout, not only would you have broken down a more significant degree of muscle before and during your workout, but you would then have to wait an additional 60-90 minutes for muscle repair to occur effectively. Considering that most of the amino acid uptake for recovery occurs within 2 hours of your workout completion, you would not be taking full advantage of your nutrition.