The Philistines were able to capture the Ark of the Covenant because Eli's sons, Hophni and Phinehas, took the Ark into battle against the Philistines, believing that its presence would ensure God's favor and grant them victory. This decision was made despite their own wickedness and corruption, which contributed to Israel's defeat. The battle took place at Aphek, and the Israelites were routed, leading to the capture of the Ark by the Philistines. The pertinent biblical account can be found in 1 Samuel 4.
The other options you mentioned are not accurate representations of the events surrounding the capture of the Ark. Eli's sons did not betray the Israelites in the specific manner described, Eli did not try to sneak out the Ark, and Samuel was not directly involved in the battle where the Ark was captured.