This behaviour is for movies classified as offline. In the preferences you have two main folder sections......
Offline Movie Folders
Any folders in the offline section will be assumed to be offline i.e. a DVD or bluray so an avi is created so when it is selected in XBMC it ask you to load the media.
Also you can't mix offline & online movies in the same file structure, they need their our top level folders.