Under the Bitcoin protocol, how much control does a node have on how a transaction is dealt with once received? Can a node reject a valid transaction? Can a node refuse to relay a valid transaction to neighboring nodes or is the transaction relayed automatically once validated? If not relayed automatically, why not? Why give a node the option to control whether or not a valid transaction gets relayed?
Nodes are just software, at the end of the day.
The Bitcoin Core software will automatically relay standard valid transactions provided they meed the minrelayfee.
It would be fairly trivial to modify the software to relay only if certain other rules are met, however. You could easily do this without impacting the rest of the node functionality.
Usually, the node broadcasting a tx will broadcast it to multiple peers, so even if some peers enforce additional relay rules, the transaction will be broadcasted further by those who don't.
Under the Bitcoin protocol, how much control does a node have on how a transaction is dealt with once received?
Look in source code.
Can a node reject a valid transaction?
The node has a right/ability to ignore anything :)
Can a node refuse to relay a valid transaction to neighboring nodes
Yes, it can. Node can do everything coded in algorithm
or is the transaction relayed automatically once validated?
Most of cliens do it.
If not relayed automatically, why not?
Why yes? In decentralized system nobody will punish for it
Why give a node the option to control whether or not a valid transaction gets relayed?
Why not? The presence of such option is better than the absence of it. This gives us on more freedom - to do or not to do
If you run the standard node software, you can expect that they will relay all valid transactions. A (edit: not only) configurable parameter (in Bitcoin Core) is the minrelayfee. So you can choose not to relay transactions if the fees are too low. This is to help prevent spam.
If you wanted to filter on other parameters (e.g. blacklist addresses), this would be easy to do by modifying the software as it is open source. This would be difficult to detect if a node is doing this, and it would not greatly impact the network unless a vast majority of the nodes started doing this. Even so, the bootstrap nodes will not do this and such an attack would not be feasible.