That's the macros. Phoenix's routing is an awesome example of the power of Elixir macros. It leverages the BEAMs pattern matching capabilities to do the routing, but the syntax is very clear and concise.
Minor nitpick. BEAM doesn't have pattern matching built-in. Core Erlang does. Core Erlang compiles to BEAM bytecode with functions using regular if-statements. So basically: Erlang/Elixir -> Core Erlang -> BEAM. (Actually, I think there is one more step there).
Minor nitpick to the nitpick, since I dug down in Elixir's compiler before. Elixir spits out a normal Erlang AST, not a Core Erlang AST, which is a bit different. There are a half dozen levels between the Erlang AST and BEAM as well. There's several instances of a talk by Robert Virding about implementing languages on the BEAM where he talks about which advantages different levels of the compiler to hook into.