How does the matching principle ensure that expenses are recorded in the same period as the revenues they generate, and why is this important?