Depends on the application...
Sometimes longer shackles are needed for spring clearance, to keep the springs from hitting the frame.
Sometimes a longer shackle is needed to account for the arch in a spring. If a spring has an arch to it, it will get longer (eye to eye) as it compresses and flattens out. That additional length has to go somewhere or something is gonna break (most likely the spring). A stock shackle may not have enough length to allow a custom lift spring to flatten out, this is where a longer shackle will be needed to allow more spring length when compressed.