A filter won't remove everything from your aquarium. Little bits of food, poop, and chemicals will still be inside of your filter. These get broken down by bacteria or other metabolic processes and make algae.