It would be good if the OP could identify if they were Bangkok Metropolitan Police or Royal Thai Police. My best guess would be the former. They have definitely increased their activities in the tourist areas, and I have often seen many foreigners stopped at their various temporary locations. Primarily foreigners are stopped for littering (discarding cigarettes) with he initial fine being 2,000 baht. Most pay this but it can be negotiated down to 200 - 300 baht.
In ~ 8 years I have never been stopped by any Police so I have no first-hand experience. Depending on the exact situation I might not submit to the entreaties of the Metro Police (also called Sidewalk Police), but would obviously for the RTP.