power transfer is maximum when r = R which means internal resistance of source equals the load resistance. It is called the maximum power theorem.
Note that we are talking about maximum power and not maximum efficiency. If resistance of the load is greater than the resistance of the source, efficiency is more but overall powr is low.
If internal impedance is made larger than the load the most of the power is dissipated in the source itself, but although the total power dissipated is higher, due to a lower circuit resistance, it turns out that the amount dissipated in the load is reduced.
This can be proved using calculus. I have copied and pasted the proof from wikipedia, url of website is also pasted for further reading.