Actually there is a bug in the demo sample. The right code should be:
// Select camera (WIA source)
procedure TMainForm.SelectCamera1Click(Sender: TObject);
begin
TreeView1.Items.Clear; // <<<<< ADDED THIS!!!
ImageEnView1.IO.SelectAcquireSource(ieaWIA);
FillFileNames;
end;
In case user clicks Cancel button in the dialog the default device is anyway selected and retrieved.
Your change is also right if you don't want to select a default device.