The police don't need a court's permission to investigate or know things about you. They might need various court orders to invade private property, take stuff, or coerce third parties to help them. But they can also just knock & ask nicely.
they often make people feel as if they are obliged, or will be inconveinienced
and when you say i have nothing to discuss with you, and no business to conduct, goodnight, and leave me to my home and family they are supposed to similarily say sorry to bother you and leave.
you have the idea of a warrant on the button, as permission to violate certain legal rights.
I found this video quite illuminating, where a law professor explains why even with the best of intentions one shouldn't talk to the police.
https://youtu.be/d-7o9xYp7eE