Recently, I was doing my homework and I found out that Torque can be calculated using $\tau = rF$.
This means the units of torque are Newton meters. Work & Energy are also measured in Newton meters which are Joules.

However, torque isn't a measure of energy. I am really confused as why it isn't measured in Joules.

The units for torque, as you stated, are Newton-meters. Although this is algebraically the same units as  Joules, Joules are generally not appropriate units for torque.

Why not? The simple answer is because 

$$W = \vec F \cdot \vec d$$

where $W$ is the work done, $\vec F$ is the force, $\vec d$ is the displacement, and $\cdot$ indicates the dot product.  However, torque on the other hand, is defined as the cross product of $\vec r$ and $\vec F$ where $\vec r$ is the radius and $\vec F$ is the force. Essentially, dot products return scalars and cross products return vectors. 

If you think torque is measured in Joules, you might get confused and think it is energy, but it is not energy. It is a rotational analogy of a force.

Per the knowledge of my teachers and past professors, professionals working with this prefer the units for torque to remain $N \ m$ (Newton meters) to note the distinction between torque and energy.  

Fun fact: alternative units for torque are Joules/radian, though not heavily used.
