We had parakeets and lovebirds that would do the same thing, they’re either really stupid or really trusting or both. Seeing how gross birds can be sometimes with just at-will pooping made it feel disgusting though, like they were gonna poop in my mouth at any moment.
They just poop whenever and wherever, doesn't matter where they're at, maybe it's subconsciously and they just don't even care. However, their almost perfect aim in hitting my car seems to suggest they have some amount of control over the process.