The problem with lowering the road is that it can then become a drainage pond and expensive plumbing has to be installed to carry away rainwater. It's much cheaper to install warning signs and make drivers who cannot pass take another route.

The railroads were often built long before there were roads in the area and since grade is a big deal to railway architects they were intentionally kept as flat as possible. Later on someone decided that Model T's could cross under them in certain places and the major crossing design elements became locked in. Other people then came along and built stuff along the roadways, further locking the design.

Imagine a neighborhood treehouse that generations of kids have adopted for a while and each subsequent group changed it how they saw fit. That's similar to the way that our road system developed before Eisenhower first saw the Autobahn.