This is because when Wurmple evolves into Silcoon/Cascoon, it loses it's Hidden Ability because Silcoon and Cascoon don't have a Hidden Ability. Since it has it's normal ability, when it evolves again the Dustox will have it's normal ability, like it previously did.
You obviously got the Beautifly from a Friend Safari.
The only way you can get a Hidden Ability Dustox is to transfer one from B/W. Sorry.
Hope I helped. :)