Because Lee Harvey Oswald wanted to kill him and had the opportunity to do so.
There are many previous threads on this topic. Here are a couple:
https://www.reddit.com/r/AskHistorians/comments/lrqoa8/the_house_select_committee_on_assassinations/
https://www.reddit.com/r/AskHistorians/comments/75sbk8/kennedy_assassination_records_may_be_fully/dob7z9l/