Trump desires to ensure ballot integrity in a key electoral state.
North Carolina is a swing state, so where majors parties win by thin margins, and a few uncounted votes can mean victory or defeat.
Another interpretation of Trump's comment is to not actually vote twice, but to verify the vote was cast by trying to vote and being rejected to test the system. Kind of like making two reservations for the exact same thing on a website: if the second attempt fails, good, if it succeeds, not good.
According to that interpretation, he would not actually be encouraging voter fraud. He's telling people to verify their vote was counted.
Next question to wonder is: Is this a good method? No. Trump's error here is assuming votes are tabulated quickly enough (put in some kind of central database) for people to be prevented to vote twice, but apparently it's not the case, so even if one voted with no problem, they'd be allowed to vote a second time. And like for a website's purchase, they are possibly better options: calling officials to check the vote was cast correctly, checking on an official website.
More on this interpretation of Trump's reasoning: it's possible Trump assumed voting in North Carolina was based on a system where you must first confirm you're eligible to vote before doing it, whereas the system is more like an honor-based system.
For example, in most places, you must have a valid ticket to take public transit, or any similar controlled area where only some authorized people are allowed in. However, it's not enforced the same way everywhere. In some places, you must first scan your ticket to ensure its validity (possibly similar to what Trump thought), and you are rejected if it's not, whereas in other places, you're allowed in, trusting you have a valid one, and if you get caught, you get a fine (more like reality in the case of voting). As a comment seems to suggest, it's possible in North Carolina, merely trying can get you arrested. In other places, you'd just be required to confirm you're allowed to vote before moving further.