When is it necessary to “set up” for perfect guitar tuning?

/When is it necessary to "set up" for perfect guitar tuning?