Because no network connection is anonymous but as long as you aren't handling PII, GDPR has nothing to say about it.
I could sell an app in the EU that just pinged my server once a day. As long as I wasn't keeping a record of who pinged what when, there is no PII.
Otherwise everything is PII and you would need consent before every TCP handshake.