Why do seeds grow upwards?
It is a reaction to gravity, it is called geotropism or gravitropism. The roots tend to grow in the direction of the gravity (positive geotropism) and the stem is going against gravity (negative geotropism).

The mechanism works with auxins, or plant growth hormones. They are pulled by gravity toward a side of the plant and will either stimulate or inhibited growth in that area.