Physics of optimal resonant tunneling