The Prophet from Beit El hoped that by having the Man of God disobey his own words and prophetic sign, he could undo the prophecy against Beit El (and restore legitimacy to the worship taking place there.)
Timing of the incident – R"E Samet suggests that our chapter is a direct continuation of Chapter 12 and takes place towards the beginning of Yerovam's reign, when he stood before the assembled crowd to bring incense on the altar in honor of his new holiday.2
Miracles of the Man of God
Yerovam's invitation – R. Samet suggests that Yerovam was hoping that if the prophet acquiesced to eat by him, it would be taken as a sign that, despite the devastating prophecy, the Man of God did not view the city of Beit El and its king as reprehensible. A public, positive response from the prophet3 would have been viewed by the people as a legitimization of Yerovam's religious innovations.
Prohibition of eating and drinking in Beit El – It was for this very reason that Hashem prohibited the Man of God from eating or drinking in Beit El. The refusal to partake in a meal in the city symbolized the total rejection of the city, and moreover, that such rejection began already in the present (even if the full prophecy was only to be fulfilled in the future).4
Prohibition of returning via the same path – Prof. Simon suggests that returning to one's point of departure and retracing one's footsteps signify a cancelling of the journey.5 Thus, had the prophet returned the way he had come it would have been viewed as a reversal of his mission and decree.6 R. Samet adds that going via a new path signifies the opposite, that "דבר ה' אחור לא ישוב ריקם".7
הנביא מבית אל: True or false prophet? According to this approach, the prophet from Beit El was a false prophet.8 R. Samet suggests, moreover, that he was closely connected to Yerovam's new religious enterprise and served to give it a prophetic stamp of approval.9
Why wasn't the נביא at the ceremony? T. Verdiger10 questions that according to R. Samet, it is difficult to understand why the prophet from Beit El was not present at the ceremony during the holiday, if he was so central to the religious upheaval. 11
The invitation
According to R. Samet, after the Man of God cast doubt on the legitimacy of the new worship during the dedication ceremony, the prophet from Beit El realized he needed to reaffirm his prophetic position (and thereby, restore Beit El's religious status). By getting the Man of God to accept his word as the word of Hashem, he could assert himself as the more senior prophet, and "prove" that his stance towards the new worship was the correct one.
Prof. Simon, in contrast, assumes that the fate of the altar was less troubling to the old prophet than the prophecy regarding the burial plots, and it was this mainly which he wanted to prevent coming to fruition. He suggests that the act of undoing a prophetic sign was believed to actively affect the word of God that lay behind the sign.12 Thus, the prophet believed that if could reverse the sign relating to prohibitions of eating etc. he could also undo the prophecy which lay behind them.
How was the man of God convinced?
Harsh punishment
Why does the navi get the prophecy?
חוטא נשכר?
Test of Prophet
The Prophet from Beit El did not know if the Man of God was a legitimate prophet or an emissary sent by Rechovam to attack Beit El for political reasons. His invitation was intended to discover whether or not he truly spoke the word of Hashem.
הנביא מבית אל: True or false prophet? According to these sources, the prophet from Beit El was atrue prophet
Act of Altruism
The prophet's motives were misguided, but altruistic. He simply wanted to prevent the Man of God from going home hungry.
Sources:Abarbanel
Personal Gain
The prophet from Beit El aimed to protect his prophetic business and standing with the king / hoped to sway the Man of God to defect to Beit El and work with him in his prophetic business.