Well, Shading languages like GLSL and HLSL is what all the "material" code ultimately get translated to in the end. Shaders are the actual programs which are run directly on the GPU, and to create them, you use a shading language.
3D packages are generally used to make it easer for you to make realistic looking graphics, and writing shaders by hand is a little cumbersome, as one would require knowledge of shader programming, Lighting mathematics, physics, and so on. What you call materials is just an abstraction provided by the package so that you can design surfaces and graphics in an intuitive, easy and fast way.
It is seen that in most cases, scenes created with 3D packages can be created using a fixed set of commonly used shaders (phong shading, diffuse, specular colors, reflections, simulating roughness and other common things). These are the things 'materials' save you from rewriting.
Though writing shaders directly can be cumbersome, provided you have all the prerequisite knowledge to do so, you can fine-tune and create effects which are otherwise not so much possible with what 3D packages provide with their "material" interface. Shaders give you full control.