Almost every bonus action with a trigger says "when you do X, you can take bonus action Y", so you can do them in any order. Flurry of Blows is explicit, though, that it happens after you take the triggering Attack action. I suspect the reason they made the order explicit for Flurry is so that...