There’s a mistake in the interpretation said in the question. At listening state, though the port is not able to forward user data, it is able to send BPDU, as IEEE Std 802.1D 1998 Part 3 page 84 section 8.4.2 said:
BPDUs received shall be processed as required by the Spanning Tree
Algorithm and Protocol. BPDUs can be submitted for transmission.
I found a YouTube video summarized the STP states and their abilities in a table. I clipped it down to below (with slightly modification which I thought such that it could be clearer)
Port States
Receiving BPDUs
Sending BPDUs
Learn MAC addresses
Forward User Data
Disabled
No
No
No
No
Blocking
Yes
No
No
No
Listening
Yes
Yes
No
No
Learning
Yes
Yes
Yes
No
Forwarding
Yes
Yes
Yes
Yes
As Zac said, 802.1d is outdated. It just for other learners like me to better understand the legacy STP process.
In RSTP+, the discarding state, also can send BPDUs, although they can’t forward user data. I think that’s why switches can communicate with each other even the two ports are in alternate role.