In the current Star Wars canon, Beskar, also known as Mandalorian iron, is an alloy used in Mandalorian armor, notable for its high tolerance to extreme forms of damage. The metal was durable enough to withstand a direct blaster shot and could repel lightsaber strikes.
From the Star Wars Databank:
Mandalorian armor forged from beskar can withstand blaster bolts, nearly impenetrable protection that made the warrior class difficult to defeat at the height of their power. After the fall of the Empire, the nearly indestructible steel is harder to come by.
Durability — the ability to withstand wear, pressure, or damage — is a common property of metals, and beskar is a metal which has extremely high durability.
By the time of your questioned S2 E5 episode, the Mandalorian has managed to fashion portions of his armored suit out of beskar. This allowed the Mandalorian to deflect the lightsaber strike.
As to your other point, blast doors are not typically made from beskar. Consequently, we see numerous times during the movies where a lightsaber cuts through a solid blast door with ease. Because this is the case, the standard blast door could benefit from a thin layer of beskar armor to deflect lightsabers if such an attack is anticipated. However, by the time of the movies (OT & ST), both lightsabers and beskar are relatively rare.