Same thing mine used to do, so annoying!
Whats basically happening is your drain can handle more flow then the pump is providing. When you start the pump, it will fill the box till it reaches the overflow, then when the pipe is full, it goes to a full siphon which then empties the pipe, and box causing it to "flush" and "gurgle".
Only thing that will fix it is a gate valve on the primary drain. You need to "tune" the drain to match the pump.
Very similiar to your bean animal setup where you have to "tune" the overflow to match your return pump.