It's literally only function is a deterrent to war, including by members against others as they will not gain NATO support unless they are attacked.
Its members might exploit, but thats a meaningless statement about NATO itself because without NATO there would literally be more war.