Elastic is also not "taking advantage" of the license. Apache License 2.0 can be combined for example with GPLv3 or as in this case Server Side Public License. This is the freedom that Apache License 2.0 provides. Both companies do what they are allowed to do under the license.
You may not like the freedoms that Apache 2.0 provides, but then you should not contribute to projects under that license. GPLv3 does not grant you the freedom to easily change license terms, so probably you should contribute to projects with that license or similar.
> If their hosted service suffers, their new license ensures that no one else can compete.
How does it ensure that no one can compete? If you release the infrastructure code you can compete.