5Ghz is much better for high speeds. 2.4GHz is heavily congested and 40Mhz is rarely possible on that band. A good router will reduce back to 20Mhz to avoid causing problems for other WiFi users nearby.
>It probably saw a congestion problem and switched to 20Mhz channel width.
I suspect you are correct here which is why the menu entry is "20/40MHz", i.e. you can't force it to 40MHz. I read somewhere that the "rules" are that if there are other devices using adjacent channels - which using 40Mhz (two channels) would overlap with - then it should drop back to 20MHz.
So a laptop with 2 antenna/radios (MIMO 2:2 - 2 special streams) will be able to get ~50Mbps download when close to router on 20MHz - with a connection speed of around 144Mbps. However, most mobiles, cheaper tablets and Android TX boxes only have one radio & antenna (MIMO 1:1 - 1 special stream) so get about 30MBps on a good day.