I guess it's not a bug. Actually, the WiFi gets switched on again after an hour by default.
To disable this feature, go to Settings app > Network & wireless > WiFi. On that page, toggle off the WiFi and you'll see a drop down menu which says "Turn WiFi back on". In that menu select "Manually". Now the WiFi should not switch on automatically.