When Porymence becomes angry, lines of code rush through its body as it becomes empowered and ready to attack anything in its way. The majority of its wings only form when this happens, so it often attacks itself to fuel its rage.
After many long years, its cellular structure underwent a sudden mutation to grow wings. Additional software was installed to make it a better Pokémon.