When entering Germany by bus from Switzerland, border checks are occasionally performed.
However, the checks are not always performed by the border police (Bundespolizei, officially responsible for passport/visa checks), but sometimes by customs (Zoll, officially responsible for checking goods), although they rarely ask passengers about goods, instead only checking passports, visas and entry stamps.
To be exact, I've had the following experiences:
At the Weil am Rhein crossing: 4 crossings, 3 checks by customs, 1 check by border police.
At the Rheinfelden-Autobahn crossing: 4 crossings, 1 check by customs, 1 check by border police (followed by an actual customs check by customs)
At the Kreuzlingen-Autobahn crossing: 8 crossings, 2 checks by border police at the Konstanz Döbeleplatz bus station 1 km away
How come passport/visa checks are often performed by customs, rather than the border police? Are they even authorised to check visas/stamps and determine people's legal presence in the Schengen Area?