When I look in music books for guitar or chord arrangements (or tabs) online for songs I want to learn to play on guitar, I notice that often a specific voicing for each particular chord is indicated. In other words instead of just noting G or C or D - the provider of the arrangement will show a chord chart or the tab will indicate which notes are to be included in the chord.
I also know that there are usually several ways to play a given chord on guitar. For example there are at least 5 ways to play a G major chord (with 4 different voicings) in first position as shown here 5 Ways to play a G Chord
Is there usually a good reason to use a particular voicing in a particular song or is it just the arranger/composers preference for how they like to voice or play the chord? Also, will an alternate voicing of the same chord work just as well as what is suggested or dictated in the arrangement or chord chart? Or will the suggested voicing usually sound better in the given song?