Why are the hydrogen-carbon bonds bent in a graphical depiction of an alkene, but are straight horizontally and vertically in an alkane?
Fundamentally, it depends on how you put a three-dimensional structure onto a 2D surface.
The Valence Shell Electron Repulsion (VSEPR) model can predict the structure of most molecules. Because electrons repel each other electrostatically, the most stable arrangement of electron groups (i.e., the one with the lowest energy) is the one that minimizes repulsion. So with the first example (propane), each bond is equally 90 degrees from each other, and in the second (propene), the bonds are 120 degrees from each other. If the bonds were placed 90 degrees away from one another, at least one gap between electron groups would be 180 degrees, thus a less stable arrangement of electrons, regardless of if it is a double bond (c=c) a or a single bond (c-c)