I only sanded it a bit, but roughing might have been a better idea
The very best way I know to get epoxy to adhere is to wet-sand the pieces with the freshly mixed epoxy. Put on gloves, spread (unfilled) epoxy on the wood, and then sand the epoxy into the wood surfaces. Then, cover the wood with another spread of epoxy, and clamp the pieces together. Epoxy, unlike PVA glues, relies upon the mechanical bond between the wood and the cured epoxy, and sanding the epoxy into the wood creates great mechanical interlock.
Also unlike PVA glues, epoxy is stronger in larger quantities than in small, so don't clamp it excessively tightly, or you might squeeze out so much of the epoxy that there is not enough left to
create a strong joint.
As other posters have noted, the specific brand and formulation of epoxy makes a huge difference. I've never had even the slightest hint of failure with WEST System when properly mixed and applied. Nor with System Three. What epoxy did you use?
While some companies and users recommend acetone to remove oils from the wood prior to epoxying, others say that unevaporated acetone left in the wood can interfere with the epoxy adhesion. I don't know for sure one way or the other, but I wanted to mention it because it could have something to do with the epoxy failure in your case.
Also, what was the temperature in the room where you applied and cured the epoxy? Too low a temperature can also lead to epoxy failing to cure properly.