Macaroni was the most common word for pasta in English too (at least in American English) for a long time after its introduction from Italy.
That and macaroon/macaron seem to both come from the same Italian source, per Etymonlone, which calls macaroons cakes: https://www.etymonline.com/word/macaroon