Preheat the oven to 350°F. Grease a 9x13x2-inch baking dish with butter, shortening, or vegetable spray.
In a medium bowl, whisk together the flour, cocoa, baking powder, baking soda, and salt. Set aside.
In the bowl of a stand mixer equipped with the paddle attachment (or in a large bowl if using electric beaters), beat the egg and sugar at high speed until pale and creamy -- about 2 minutes. Beat in the vanilla and mayonnaise. Scrape down the sides of the bowl as needed. Next, at "low" speed, and in alternating additions, add the flour (3 additions) and the water (2 additions), beginning and ending with the flour.
Pour the batter into the prepared pan. Bake until a skewer inserted in the center of the cake comes out clean -- 30-35 minutes. (Add additional time if your baking pan is smaller than 9x13x2-inches.) Transfer the cake to a wire rack and let cool completely before frosting.