Why does oil burn when put into a hot pan?
Yes, your pan was too hot.

Because your pan was empty when you heated it, it had minimal heat capacity, and could only lose heat by convection and radiation.  Thus, it heated up quickly, and likely reached a much higher temperature than it normally could with food in it.

When you heat a pan with food in it, some of the heat is transferred to the food, and much of that heat is, in turn, lost when water in the food evaporates.  This slows down the heating rate, and significantly reduces the peak temperature reached.

(Evaporating water is an extremely efficient method of heat transfer, especially at high temperatures, and even solid foods like meat and vegetables still contain quite a bit of water.  Any time you put something on a hot pan and it steams or sizzles, that's the sign of water evaporating.)

Also, because you didn't have any oil or water or food on the pan, you had no easy way to gauge its temperature by eye.  Normally, if you heat a pan with oil already in it, you can tell when it's hot enough just by looking at how the oil behaves.  If you miss all the subtler signs, like the oil turning more runny and starting to form convection patterns, the point where it starts to change color and smoke is an unmistakable sign that you've definitely heated it too far.

With a dry pan, it's quite hard to tell just how hot it is.  One trick I sometimes use is to sprinkle a few drops of water onto the pan and seeing how quickly it evaporates.  (Don't do this if the pan already has oil in it!)  When the drops evaporate all but instantly (but still briefly wet the surface, rather than exploding on contact or hovering over it), it's time to add the oil / butter.

Of course, the modern high-tech alternative would be to get an IR thermometer.  I actually do have one, but I rarely use it &mdash; it's just quicker and easier to dip my fingers in some water and sprinkle it on the pan than to get the thermometer out of the cupboard.