I don't know if 45° wings provide good lift or not, but what I know is that they would induce a lot of 'drag'.
And that the goal is to maximize lift while minimising drag..
So it isn't that complicated why the wings are the shape they are: if there is a 'gentle slope' the air will be redirected downwards without inducing too much drag.