user7734: I was looking Arduino Mega's schematic and I noticed a resistor between the MCU and its resonator. R3 in this image:

Why is it there and what is its function?

user10147: That resistor limits the drive through the crystal.  If the power applied to the crystal is too high then the slope and phase shift at the resonant frequency will not be optimal and at really high drive levels could cause mechanical damage to the crystal (like that shattered wine glass trick).
See good instruction PDF here, section 2.1. 

7734: <p>I was looking Arduino Mega's <a href="https://www.arduino.cc/en/uploads/Main/arduino-mega2560-schematic.pdf" rel="nofollow noreferrer">schematic</a> and I noticed a resistor between the MCU and its resonator. R3 in this image:</p>

<p><a href="https://i.stack.imgur.com/fadvk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fadvk.png" alt="enter image description here"></a></p>

<p>Why is it there and what is its function?</p>
 10147: <p>That resistor limits the drive through the crystal.  If the power applied to the crystal is too high then the slope and phase shift at the resonant frequency will not be optimal and at really high drive levels could cause mechanical damage to the crystal (like that shattered wine glass trick).</p>

<p>See good instruction PDF <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=4&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwiozMK9gJXRAhWKrVQKHf7WBYwQFgg4MAM&amp;url=http%3A%2F%2Fwww.geyer-electronic.com%2Ffileadmin%2Fuser_upload%2Ffrequenz%2Fservice%2FQuarz-Tutorial_en_2.2_Geyer.pdf&amp;usg=AFQjCNHvE9vkQIcqmR2YDzRe2AySD0kHWw&amp;bvm=bv.142059868,d.cGw" rel="nofollow noreferrer">here</a>, section 2.1. </p>
