Hundreds of theories on why Shanks has his position have been submitted and my take builds on many of them on the subject. So here goes my theory, on why Shanks is respected by Pirates and the World Government alike.
1. Shanks’ Strenght
His Yonko status comes from him being crazy strong, just like Big Mom, Kaido, Whitebeard, etc. Because of his strength, he is feared and respected by pirates. Furthermore Shanks has been implied to have the best crew out of all the current Yonko and he would no doubt win in a full out pirate war among all the Yonkos.
2. Shanks as “The Gatekeeper”
Many people have stated that Shanks might be a gate keeper to Raftel, meaning he will hinder pirates from reaching the One Piece. My theory is that Shanks has made a “deal” (I’ll explain the quotation marks below) with the World Government, stating that he will protect the One Piece to be found, and that is part of where his influence comes from.
3. Shanks paralleled to Doflamingo
What’s more is that he is sort of a parallel to Doflamingo. Upon being on Roger’s ship, he knows about the World’s secrets. And since he is too strong to be killed, the World Government would rather have a cooperating relationship with him than a hostile one.
4. The Truth of the “Deal”
This deal with the World Government is not entirely true. While Shanks really is guarding the treasure, he is not doing so to keep the treasure hidden and protecting the World Government. He is doing so to ensure that the treasure will be found by someone worthy, meaning our favorite rubber boy. And this the World Government does not know.
In conclusion: No one alive from the World Government has seen the One Piece so they have to trust Shanks when he said he will guard it on their behalf, since they can’t beat the truth out of him. Shanks, however, stands guard for a more true reason, he uses his status to keep the world peace and ensure evil powers don’t arise (I.e, trying to prevent the rise of Blackbeard).
*Theory by milky-cow