A primary candidate should seek electoral advantages even if it hurts his or her party because they are running for themselves. The primary elections are the time to demonstrate why the candidate is the best option compared to other options in their same party, so they must do whatever they can to seek their own voters' favor. This makes it unlikely that they would hurt the party overall because they are only fighting for votes already in the party.
If someone is running for office, they should be doing so because they believe they are the best one for the job, not to benefit their party. Partisan ideals and dominance are not good for any nation. In order to make a nation great, one must think beyond their political party's influence over their nation and instead focus on the actual issues at hand.
A primary candidate should not seek electoral advantages even if it hurts his or her party overall because the candidate was chosen to represent that party and their constituents. If a candidate seeks electoral advantages at the expense of their party, it is a selfish decision and this person should not be chosen to continue to represent the party. The US government is designed to have representatives that reflect the beliefs and ideals of the people. A representative who chooses to not act according to his or her people is no longer a representative.
Winning at all costs could hurt the party's chances in November. A Democrat in the White House would be a far better alternative than having a Republican win. Although policy differences are fair game, any personal attacks will weaken the nominee and give a leg up to the other party in November and possibly future elections..