|We Take the Town was produced by Stuart Ostrow, with whom Sondheim seems to have been friendly. Ostrow at one point was supposed to produce The Girls Upstairs. I believe Sondheim also went to see 1776 out of town. There was a mutual friendship with Frank Loesser, which may have had something to do with it. Also, I believe Jerome Robbins was asked to take over We Take the Town, so perhaps Sondheim went with him to see it.
I feel like I get why Sondheim wishes he had written it, "at least in part." Important to remember the "at least in part" part. It's a unique song, there is nothing else like it. I like it myself, but I bet Sondheim at minimum admired it for being unlike anything else he had ever heard. It's both a comedy song and yet very dark. These really are not nice guys. It's written from the sociopathic point of view of killers.