From architecture point of view, meaning why they are created in different files, this is for convenience purpose. You can just put the class and the struct in ContentView file as well, and nothing will change. As your project grows it will become more difficult to search for necessary parts of the code etc. So it makes sense to separate those parts in different files so that you can navigate easily.
As for why we have Expenses class and ExpenseItem struct, think of it as: Your Expenses is like a LogBook for all your expenses your made. So this object will contain separate ExpenseItems that consist of some data (i.e. date, descprition, amount etc.).
Classes can conform to ObservableObject protocol that you can "observe", meaning if anything changes in class published property, it will notify View that uses that class and it will refresh data. Struct on the other hand is used as a blueprint model and does not provide such options as class.
Basically in this project Expenses Class is your LogBook object, and you have one logbook, so you can reference to it in your app. And ExpenseItem struct is single entry in your logbook but you will have many of them.
You can keep them all in one file, but I repeat myself, in real project as it will grow it becomes cumbersome to read, navigate etc., so it is more convenient to separate those pieces in different files.