From what I understand (not saying I'm right) eg. two heads with same flow curve, the better the port design/shape the higher the velocity you can successfully use (smaller csa and volume) before port chokes, higher velocity = better cylinder filling = more power.
So obviously port flow is just one part but is a part.