It's just different things.
Once you get over about 12mph on the flat, most of your power is consumed overcoming wind resistance. Consequently your aerobic power to frontal area ratio determines how fast you can go. You can improve by either getting stronger or by working on your position on the bike.
In the hills you have to raise your body weight upward. As your speed drops your power to weight ratio determines how fast you can go. You can improve by getting stronger or by reducing the weight load from either the bike or your body.