It's because of limited pixel density in exported png
=> when you make anything in illustrator it means you've made vector asset and vector is based on points which is Density independent so no matter how long or small you zoom it. it'll be always same clear as before and no pixelation will be happen.
=> now come to the PNG (take photoshop) whenever you export your asset to something like png and jpg. your vector doesnt remain same and it's characteristic get converted from points to pixel so now all your artwork will be converted to pixel(smallest possible square of color) and will get assigned to some DPI ( mostly 72).
=> now the reason i explained both term is because when you convert your vector to raster(PNG and JPG etc) it only do transformation to pixel level and when your artwork contains gap like 0.24545 pixels then it renders 1 blank pixel because subpixel transformation isn't possible in raster images. look down below image to understand more.
==> It seems like no gap at all in illustrator (there is very slight gap) but hardly visible on 6400% zoom)
==> but when it exported in pixels it shows 1 pixel transparent line. so to avoid it you have to merge shapes as much as possible. i use Shapebuilder tool (Shift+M) and avoid using cross lines if you don't wanna merge. as long as there is straight line gaps (horizontal and vertical ) there shouldn't be any problem.
Hope this helps!
TLDR: Just use as many as merged shapes. use any methods to merge shapes and it'll turn out in good result.