They do different things. Agora is an RTC platform. PubNub is, as I understood it, a glorified websocket, which is used for realtime updates, like people joining and leaving a room. I have no idea why they chose this particular stack.
Yeah I'm using Agora for my project, as for real time update I find updating a state in firebase on one end and adding a listener on the other end to be "realtime" enough. So i'm trying to figure out what I'm missing, and the PubNub website is not very elucidating.