It looks like this is a bug julia#47942 in the isassigned code. What it does is to convert 500, 514 to a (zero-based) linear index and check that this is < length(a), which succeeds here because 500-1 + (514-1) * size(a, 1) < length(a).
This check ensures that the linear index is in-bounds (so it prevents jl_array_isassigned from crashing) but it is not a sufficient check of the multidimensional indices.
Maybe @tim.holy can comment further, because the code originated in julia#11167 way back in 2015 (for Julia 0.4).
That being said, if you just want a bounds check (which is all isassigned can do for Matrix{Float64}), you can call checkindex or checkbounds:
julia> checkindex(Bool, axes(a,1), 500) && checkindex(Bool, axes(a,2), 514)
false
julia> checkbounds(a, 500, 514)
ERROR: BoundsError: attempt to access 161×517 Matrix{Float64} at index [500, 514]
I think I merely happened to stumble on isassigned first. The docs for it say it will return false if an index is out of bounds, and it seems to be the most commonly suggested method out there when I google around. So I assumed it was the idiomatic way of doing it. Would be surprising if it has a longstanding issue that nobody hit before me, but I’m sure crazier things have happened.