Imagine situation, when you pass some Module in the function. Some methods from this module should be called in your function, and to ensure there existence you can define behaviour.
So the question is - how to spec the fact that Module that is passed to your function implements specific behaviour.
If it’s not done like this - then what’s the sense of behaviours at all???
Check what? You should not check that a module given to a function implements the behaviour. A better route is to assume it does and have it blow up if it does not.
Either way that’s still a fundamentally different kind of check than one that happens at compile time with the warnings I mentioned before.
Elixir is a dynamic language, using behaviours does not change that.