A basic solid state relay circuit
I answer to your questions following their ordering: let's start from the first. 


  What is the reason of putting R3?


As stated by Russel McMahon, the resistor \$R_3\$ is used to avoid the unwanted turn-on of the TRIAC when the gate is left floating due to stray capacitance coupling between the anodes \$MT_1\$ and \$MT_2\$ and the gate \$G\$. This in turn is due to normal variation of the AC voltage \$V_{MT_1MT_2}=V_D\$: if the value of anode voltage variation rises above the limits stated in the BTA06 datasheet, the device may be turned on by a capacitively injected gate current 
$$
I_G\approx C_{jDG}\frac{\mathrm{d}V_D}{\mathrm{d}t}
$$
The \$R_3\$ resistor shunts away from the gate \$G\$ a large part of this spurious gate current, thus preventing unwanted operation: for this reason, I would not rise too much its value, because this may rise the gate sensitivity to  anode voltage variations. If you need to avoid this dynamic power dissipation, there are some smart gate triggering circuits involving depletion MOSFETs which may be very useful from this point of view, as the ones described in this TEMIC application note AN901, pp. 4-5. As remarked in the comments, these design choices can improve the performance only for resistive loads as the shown heater, since they can only improve the performance respect to anode voltage variation, as remarked also in the application note.


  And if the gate of the BTA06 needs only 50mA as a maximum triggering current, then how could the value of 180 ohm resistor be Ok? It seems calculated as if the maximum current of the MOC3020 optotriac would be 1A and the supply voltage is 120v rms but has it to be the maximum value ? And wouldn't that current destroy the BTA06? 


This group of questions requires a joint answer since they are all tied together and tied to the first question. Now, keeping in mind the  considerations in the answer to the first question, the low value (\$180\Omega\$) of the \$R_2\$ resistor is required by the presence of the shunting resistor \$R_3\$: in order to get a wanted \$I_G\$ of at least \$50\mathrm{mA}\$ the optotriac should inject a larger current to the gate node. And this will not damage the MOC3020 nor the BTA06, since
$$
I_{TS_\mathrm{max}}\simeq\frac{V_{AC_\mathrm{max}}-V_{GT}}{R_2}=\frac{120\cdot\sqrt{2}-1.3}{180}\simeq 0.94\mathrm{A}&lt; I_{TSM}
$$
(according to the value of \$I_{TSM}\$ stated in the MOC3020 datasheet), and this implies that even the value of the gate current is well below its absolute maximum rating
$$
I_{G_\mathrm{max}}=I_{TS_\mathrm{max}}-\frac{V_{GT}}{R_3}\approx 0.94 \mathrm{A}- \frac{1.3\mathrm{V}}{56\Omega}\simeq 0.917\mathrm{A}&lt; I_{GM}\:(=4\mathrm{A}).
$$