Thats what happens when the true fighting potential is unknown ... lol
Shanks is an idol for luffy and rayleigh is his teacher... Shanks is his motivation and Rayleigh is the one helping him utilize that motivation.....
And why people pointing out that Shanks blocked one of the admirals attack.. Didnt rayleigh did the same (Kizaru is an admiral) ... and Shanks had the crew with him..otherwise there was no way that Shanks could have alone stopped Admiral to kick asses...
Rayleigh was shown so much proficient with sword even when he picked it after so many years... he was the first mate ... and Shanks definitely respects him .. Marines were not able to catch him (even in the presence of Pacifistas... and an admiral) ... When he was their priority as soon as they came to know he is the first mate of roger... Everyone associated with Roger was captured by Marines... but not rayleigh over all this years...
Rayleigh wins without a doubt... if its a battle... if its a drinking competition... a swimming competition(he swam through calm belt killing several sea kings with his bare hands... and We dont even know if Shanks is proficient enough in all forms of haki.. (we are assuming it since he is shown proficient enough in kings haki) .,,, what if shanks is very weak in other forms of haki as compared to Rayleigh ,,, and we know that armament haki is pretty useful in a fight..