It works as expected, but since your button stealed the focus by clicking on it, you're then trying to focus that edit box back again. And by focusing an edit box, all of its text is selected by default. Here's a simple proof, that the text is selected if the edit box has focus while selecting:
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.SetFocus;
Edit1.SelStart := 5;
Edit1.SelLength := 5;
end;