what the hell are you talking about?
no one cares how you think the laws should be. The laws are the way they are. The police can detain you if they have reasonable suspicion to believe you are involved in a crime in any way
this was 100% legal according to the laws. no one cares what your fantasy interpretation is