I think setContentView will set the specified layout as the layout of the Activity your are running, while LayoutInflater can be used in situations where you need to use a layout but not necessarily use that layout as the layout for the Activity itself.
For example you may want to inflate a custom layout for the listview's items, which has nothing to do with the layout of the Activity. In this case you will use a LayoutInflater.