Sorry for doing something unnecessary.

Literal

Unnecessary thing [object-を] having-done, am-sorry.

A common apology formula. 余計なこと ('unnecessary/uncalled-for thing') uses 余計 (よけい, 'extra / superfluous'). をして is the て-form of する with the object marker, linking to すみません ('I'm sorry'). This is a standard way to apologize for overstepping — the speaker acknowledges they did something that wasn't asked for or wasn't their place. すみません is the go-to polite apology in everyday speech.