As much as I know, we British Bangladeshi's also used to rank near the bottom, even behind Pakistani's before the late 2000s. But that got turned around really quickly. Bangladeshi's are doing pretty okay now, 3rd best ethnic group (at least the major one), behind Chinese (league of their own) and Indians. I think the rate of improvement of Bangladeshi students is also among the highest. But we need to go much higher.
I think one of the major factors for this change was investment in schools in London, where Bengali's tend to concentrate the most. Bengali-rich areas in London had some of the worst performing schools in the country. And now, they are one of the best performing schools in the country. So investment definitely made an impact.
And being in London, as the Bengali communities have much better access to more investment and funding than say Bradford (Pakistani-rich, underperforming schools).
Migration patterns between different ethnic groups also has an influence. The British Bengali and Pakistani diaspora came from agricultural backgrounds. They were virtually invited by the British government to fill very low skilled labour jobs due to manpower shortages in the 50s and 60s. Indian migration is a lot different. They tend to originate from much wealthier metropolitan districts, or from the African pseudo colonies (Kenya, Uganda etc).
In the US it's a lot different. Pakistani elites (at least compared to the sorts that ended up in the UK) tend to settle there. And unsurprisingly, tend to be fairly successful. FAR more successful and wealthy than their UK counterparts (even if we normalise the quality of life, income differences between UK/US).
But I do think there is definitely are multiple cultural factors. If your family lacks an intellectual culture, you're far less likely to pick it up from anywhere else. I came to the UK aged 8. We were dirt poor, near poverty level, both parents had to work to put food on the table. Non-the-less, we came from an educated family from back home that always emphasised education. My dad told me as brown folks, our only currency in this country is our education and merit. We have to work 10 times harder than everyone else just to be on the same playing field. And that was a tremendous advantage on my part. None of the kids I grew up with had parents that pushed them as hard. Either they were entitled, or had very low expectations, or both.