They normally try to keep train track grades of less than 2% over very long distances. ie as flat as possible.
As for why the road that goes over the tracks is so steep - that is a question for whomever owns the road. I assume its an easement like any other, so it would be up to whomever owns the road to decide on the grade of the part crossing the tracks. I assume there cheap like everyone else.
The railroads typically own the entire tracks and the areas around it. Permission for an at-grade crossing would be negotiated with the railroad.