Because you are inserting the text into the existing text, rather than replacing the old text with the new text.
Try
textBox4.Text.Insert(textBox4.SelectionStart, strInsertBefore);
textBox4.Text.Insert(textBox4.SelectionStart + textBox4.SelectionLength - 1, strInsertAfter);
instead