Enabling the 'Strict variant matching' option ensures that if the variant is missing from the build an error is reported. When it's not enabled, the application silently chooses a "close enough" variant.
The API documentation clearly states this: https://docs.unity3d.com/ScriptReference/PlayerSettings-strictShaderVariantMatching.html.