You need to consider your fitup and (field ??) assembly and re-assembly requirements: If the bolt will be used to align or compress the two components, very very often an extra inch or 1-1/2 is essential is aligning the pieces before they are bolted up tight. (The parts may be hand held or lifted up by a crane, so the first bolt is used to fit into the hole so the others can be inserted and then tightened.) On the other hand, close spaces or lifting limits on removing the two parts may require a very specific "maximum length" that the bolt can be, you may be limited by the removal length of the bolt!
Equally, you may find you are quoted an obscene price for custom-length bolts when a standard-size 6 inch (instead of 5-3/4 for example) is available off the shelf.