Calling an election has a number of benefits.
First of all, it's an opportunity to get rid of MPs from one's own party who aren't absolutely loyal. Those people may at one point or another block legislation from the government or even support a vote of no confidence. Getting rid of them means bringing in new people who are selected to be more loyal.
To support this, consider the Guardian's article on recent deselections:
Among the 21 rebels who lost the Conservative whip were eight former cabinet ministers, some of whom occupied the country’s highest offices just weeks ago, as well as multiple Conservative veterans including the grandson of Sir Winston Churchill.
As you can see, those are not just backbenches, some are high-profile party members who only recently were cabinet ministers themselves.
Some background info on deslection from the BBC (separate quotes, the BBC article gives a much more detailed overview):
If an MP is deselected, it means they are removed as a candidate and cannot represent their party at a general election.
Tory MPs have been told if they defy the government in a series of Commons votes this week, they will have the parliamentary whip withdrawn and will not be able to apply to be a candidate.
Maintaining popularity (among Brexit supporters, at least)
Roughly speaking, the British population is split into remainers and Brexiteers. Boris Johnson and the (ERG) faction of the Conservative party won't satisfy those who want to remain in the EU. As such, there is little incentive from an electoral perspective to satisfy their concerns.
Instead, they seem to have opted to double-down on Brexit, promising no further delays. As quoted from CNBC:
He has already caused a stir by saying that the U.K. must leave the EU by the October 31 deadline “do or die, come what may” even if that meant leaving without a deal in place.
This seems electorally savvy, as the UK uses a first past the post system. As such, if Brexiteers unite behind the (cleansed) Conservative party, they are almost guaranteed a large number of votes. Indeed, the new Brexit party, which won in the 2019 European Election, has already vowed to join forces with Boris Johnson. From Sky News:
Nigel Farage has told Sky News his Brexit Party will stand down candidates against the Conservatives if Boris Johnson calls an election and backs a no-deal divorce with the EU.
He offered the non-aggression pact while warning Boris Johnson would "die politically" if he fails to deliver Brexit on 31 October.
The other parties, however, may not be as united and when they split their votes (e.g. a Liberal Democrat and a Labour candidate fighting for the same seat) they may lose even in a remainer district.
Even if Boris Johnson doesn't manage to form a government after the election (for lack of seats), he maintains face. After all, he has outlined his principle (leave the EU as soon as possible, no further delays) and he seems to do everything he can to make that true.
Anything that blocks his goal is due to others and he can blame them. For example, when (Conservative) MPs vote against the government, that's on the MPs, not on PM Johnson. When he loses the election, it's an electoral choice, not his fault.
As such, from the standpoint that he has taken, his record remains unblemished.