I doubt it died by getting stuck to the filter intake, they're stronger than that. It's more likely it died, an then the filter sucked the corpse. If it wasn't dead when you pulled it off, it was pretty close if the filter had power over it.
Is the filter cycled? Bettas are pretty resilient, but they can still die from ammonia problems. look at the
beginners resource centerfor more info about this.
Did you acclimatize the betta to the new tank? It might have died from temperature shock. Try to slowly introduce the betta slowly to the new tank, by floating it in a bag for a while. I know they aren't kept at such a high temperature in the stores.
Putting all this past, it might have just already been weak and sickly since you bought it. Bettas in the little tupperware things at the stores don't tend to last very long in the tupperware things. They don't get water changed, they don't get water heated or filtered, I don't even know if they really get fed. Try to get a betta as soon as it hits the store, when they're not weak and sickly from the neglect.
The fact it was hiding behind the heater is a bad thing as well. How big is the tank? You might want to add some decorations such as plants and caves, fish hiding behind the filter intake or heaters is a sign of them being really uncomfortable.