It was part of a nasty racial compromise which was required to get many signature New Deal bills through Congress. You will find similar "compromises," some of which have subsequently been fixed, in the original Social Security Act, the original Fair Labor Standards Act, funding for public housing, etc. I haven't actually done research on the legislative history of the National Labor Relations Act, so I can't tell you which chamber required the compromise (though if you want to talk about the Civil Rights Act of 1964, I can tell you a lot about the process by which sex became a protected class), but the basic premise behind the idea was that, in the South, the vast majority of agricultural workers were black (the same goes for domestic workers, which are also excluded from coverage under the NLRA) and Southern congressmen were going to do whatever they could to prevent them from organizing. They weren't going to get away with being explicitly racist, but they worked around that.
Now, how were they able to force such compromises? Due to nature of party politics in the South, i.e. that they didn't exist, the real race was the primary which was controlled by local poohbahs, tenure among Southern Democrats tended to be incredibly long compared to their Northern colleagues. When the Democrats captured both Houses of Congress in 1930 it was the first time they had been in the majority since the 1918 midterms. Southerners were appointed to fill many of the most important committee chairs, which allowed them to effectively throttle debate on issues they did not want raised. For example, when the NLRA was passed, the Senate Finance Committee was chaired by Sen. Byron Harrison of Mississippi, the Senate Appropriations Committee was chaired by Sen. Carter Glass of Virginia, the Senate Majority Leader was Sen. Joseph T. Robinson of Arkansas; in the House, Rep. William Bankhead of Alabama chaired the Rules Committee, the Speaker was Rep. Joseph Byrns of Tennessee, etc. etc.
Finally, I will say that it is still possible for agricultural workers to organize. Not being covered by the NLRA does not mean you /edit: cannot/ have a union, it simply gives you access to the National Labor Relations Board, which has adjudicative power to enforce penalties for unfair labor practices against employers (and unions, but that is mostly post-Taft-Hartley in 1947 and again only in industries covered by the Act). Not being covered by these protections means that employers have wider leeway to break organizing drives, but post Taft-Hartley it actually gives agricultural workers access to certain tactics which other unions are forbidden from using, such as secondary boycotts and sympathy strikes, which were used to great success (to a degree) by organizers such as Cesar Chavez.