Javid told the BBC that he had asked the prime minister's office why, but had not received a satisfactory answer.
"I was just told that normally home secretaries aren't invited," he said.
Javid's predecessor as home secretary, Amber Rudd, attended state banquets for foreign leaders during her term in office.
"I don't like it. It is odd," said Javid, one of several Conservative lawmakers currently running to replace Prime Minister Theresa May.
Javid, whose parents came from Pakistan, said he wasn't suggesting the exclusion was connected to his Muslim background.
In 2017, after Trump retweeted a British far-right group, Javid tweeted: "So POTUS has endorsed the views of a vile, hate-filled racist organisation that hates me and people like me. He is wrong and I refuse to let it go and say nothing."
Trump has repeatedly expressed animosity toward another prominent British Muslim politician, London Mayor Sadiq Khan. Trump called Khan a "stone cold loser" as he arrived in the British capital for his three-day visit last week.