Wifi chips are cheap. So cheap, that I'd all but guarantee they're still making a profit on it, even at $5. You can get ESP8266 chips from people in china for about $2.50 each including shipping, and those will do everything these buttons do. Given Amazon's volume, they probably cost half that for them, so hacking them is pretty much free advertising.