Places like ITA matrix, google flights and skyscanner generally consolidate prices from online sources. in fact, google flights and skyscanner have a link that brings you to the source with the same price. these services may not have the same price and some airlines maybe available on 1 platform but not the other
Places like expedia is an online TA, and operate similar to traditional TAs. there are many ways TAs could operate, but in general, they have access to brokers who sell air tickets, can be brokers themselves or have some arrangement with the airlines for a cut for every ticket sold. the prices are usually different from what you can find online.