There are 2 reasons why it is recommended to change the oil filter every 3000 miles.
1: Oil collects dirt/unburnt fuel as your engine burns fuel. It also burns in your engine too. The filter filters out any solid particles which may collect in your oil, it also collects the sludge which collects from burning oil. These may eventually clog the filter and stop the flow of oil, which would cause the engine to malfunction.
2: Oil filters are made of special filtering paper. Over time, exposure to oil weakens the paper, and it may begin to tear and come out of the filter, thus putting more dirt & shredded filter in your engine.
Most conventional oil is safe to run for 6000 miles, provided you top it off occasionally, and change the filter every 3000 miles. Full Synthetic oil is rated such that it can be ran for 15000 miles, provided again you change the filter.
There are more expensive filters available which can filter properly for up to 7000 miles, they are not made of the same paper as conventional filters. They are denser, and have more filter layers in general.
Neither of the above practices should you follow if your vehicle is under warranty. Running oil/filter under any circumstances over 3000 miles voids your auto's warranty.