It is factually untrue that Elixir's variables are mutable. What you're likely confused about is "variable shadowing" and in functional languages where values are immutable (and they are immutable in Elixir as well as Erlang) it's a very common pattern.