My experience with bringing your own food is this:
Valentine's day cookies to a pub that served food, but had very limited dessert options. Maybe ice cream. They were fine with it (I think someone called and asked beforehand, or inquired during the course of a previous visit), no additional plates were required, and no additional fee was charged.
Special occasion cake - at a celebratory dinner, a friend called and asked beforehand and asked about bringing a special cake, and the restaurant said no. No problem. The restaurant also served some very nice (although not cake) desserts. No problem, we had a wonderful time.
Of course, these were also in very different locations, so there may or may not have been health code differences.
I don't want to veer into legal territory, but FYI, I just asked my Chef, and he says the health department here does not really approve of outside food, but does not forbid it unless it's home-made -- so if the restaurant will allow it, it still has to be store or bakery made.
Restaurants may also be concerned with allergies - if they don't have any tree nuts in the restaurant, or if they specialize in vegan or gluten-free or whatever, they may not allow outside food at all in order to avoid any possibility of cross-contamination. Also, there may be insurance issues as well.