I have an EE EU passport with a B2 visa that I have used to travel to the US probably 10+ times without issues, and also acquired British citizenship not too long ago. If I travel to the US again then for sure I will still use my EU passport until the B2 expires. No need to use my British passport just to show off like you seem to have.
Regardless, it always up to CBP whether to allow entry or not. With a US husband you are an instant overstay risk, so its no surprise they grilled you to make sure you do things the right way, otherwise they wouldn't be doing their job.