Not necessarily very necessary at all. Many hospitals have stopped offering it routinely, unless there are other risk factors. The information available varies, and so there is no clear guideline as to whether testing is beneficial or not. From an Australian research project that aims to rationalise investigations during pregnancy:

In the absence of high level evidence to either support or abandon the
practice of screening for gestational diabetes mellitus (GDM), midwives
and doctors may reasonably a) not offer screening b) selectively offer
screening to all women with risk factors or c) offer screening to all
pregnant women.
http://www.3centres.com.au/guideline..._screening.pdf

It should be noted that in the full booklet the 3 Centres Collaboration produces, they suggest having the test, but essentially this is only because it is what has always been done - as they themselves point out, there is not enough evidence for them to recommend it or rule it out.