Turkish and Azerbaijani officials accused Pelosi of visiting Armenia and making statements there that would gather domestic support from the diaspora in view of the upcoming US elections. E.g. the MFA of Azerbaijan said
In general, N. Pelosi is known as a pro-Armenian politician, and the presence of pro-Armenian members of Congress in her delegation directly demonstrates this. Taking into account that the period of mid-term elections to the Congress in the United States is coming, it seems that N. Pelosi is using this visit to gain the support of the Armenian lobby circles in the United States and her internal political agenda.
Is that a plausible main motivator though? How much of an impact does the Armenian lobby make in the US elections, e.g. in terms of donations? Or how many swing districts have large Armenian American concentrations? (Whichever of these might plausibly be a factor in the next elections.)