Specifically, the prohibition is against doing “work.” And the rabbinical interpretation around electronics is that pressing a button constitutes completing or “building” a circuit i.e. “work.”
Close but the real reason is that you're not allowed to make fire and pushing an button that switches electricity is compared to making a spark, ergo fire, ergo not allowed :)