Cap points earned by actively capping is one of the ways you can earn base xp. Stealthy destroyers on average get less damage per game but have an easier time capping than a BB would. This is a way that they make up that difference in XP and are incentivized to attempt capping.
Gunboat DD’s can farm ships all day but aren’t generally as good at capping, so stealthy DD’s need something to help make up for the fact that capping is their forte and that is cap points, but it only makes sense if they are successful. Battleships earn more damage per game than DD’s that excel at capping so the difference is made up for there.