The reality is if pinging a server—in and of itself—would cause noticeable network degradation then there would be worldwide bans on pinging devices. This blog post explains it clearly:
A ping is 32 bytes in size, and if transmitted over the internet, is only 84 bytes (due to IP Header involved).
Servers/Computers can receive a maximum size of 65535 bytes. You divide this amount by 84 bytes, there needs to be at least 780 ping request from the Internet be for the Servers to be affected.
And yes, pings can be used maliciously—such as with the “ping of death”—but the reality is that pinging, doing a traceroute, doing a port scan, etc… Are all the basic “eyes and ears” of the invisible world of data transmission debugging. Simply using them would not cause any issues.
That said, what could most likely be happening is someone—who like you—is noticing a slow-down on that access point has decided to roll up their sleeves and play amateur network analyst. Meaning they are simply pinging that access point from their access point to attempt to debug.
What is most likely happening is that the network topology itself is borked. Meaning you should talk to your building’s management about the situation and see what is happening.
Short of that, another issue could be your connection speed. I’m going to take a wild guess and say that your MacBook is attempting to connect to the access points via 802.11n. And it could simply be the case where one of the access points is handling your connection better than the other. If you read up on a 802.11n you will see that connection speed and consistency is a fairly common problem.
So from your side the two things I would recommend seeing if you can downgrade your Wi-Fi connection speed to 802.11g or perhaps a specific 802.11n radio frequency of 2.4Ghz exclusively or 5Ghz exclusively. And when you do that just do some tests to see if network speed degrades again or stays consistent.
And looping back to the neighbor’s AP, there might be some odd issue where your neighbor is using their device to attempt to extend the Wi-Fi within their apartment. And for some reason the access point is degrading all other 802.11n connections because of this.